slidenumbers: true autoscale: true
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// FunctionalComposedControllerSample | |
// | |
// Created by freddi on 2020/10/16. | |
// | |
import UIKit | |
infix operator |> |
try! Swift Tokyo 2019
皆さんのSwiftリテラルの深い理解への導きと、脱「リテラル初心者」の手助けをさせていただきます。 Swift CodeからSIL、そしてLLVM IRコードまでの「リテラルオブジェクト」の旅を見て、コード上のただの文字列であるリテラルが「どのようにして私達(そしてアプリのユーザー)の手元にデータとして渡される準備が整うか」を、「Intrinsic Protocols(組み込みプロトコル)」とともに見ていきます。 また、そこから「既存のIntrinsic Protocolsを利用したリテラル活用術」と、「Swift5.0 のリテラルのための新機能」にもフォーカスしていきます。 一緒にSwiftのリテラルの世界を覗いて、Swiftリテラル初心者から大きな一歩を踏み出してみませんか?
- Github: freddi
- Twitter: @___freddi___
- Linkedin: Linkedin
- Graduated from Computer Science Degree in Japan.
- Working as iOS Engineer at LY Corporation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let values = [ | |
0 | |
] | |
let value = 0 | |
// 自明な型エラー | |
print((value.0 == values.0)) | |
// 自明な型エラー | |
print((value.0 == values.0) && (value.1 == values.1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
class SomeCallable { | |
var completion: () -> Void = { } | |
func call(completion: @escaping () -> Void) { | |
// Do something | |
self.completion = completion | |
} | |
} | |
class SomeClass { | |
var value: Int = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension SomeClass { | |
#if DEBUG | |
@available(*, deprecated, message: "Replace before releasing") | |
static func waitingReplace<X>(_ x: X) -> X { | |
return x | |
} | |
#else | |
@inline(__always) | |
@available(*, unavailable, message: "Replace before releasing") | |
static func waitingReplace<X>(_: X) -> X { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// test | |
//. | |
// | |
import UIKit | |
class ViewController: UIViewController { |
NewerOlder