iOS オールスターズ2でお話しした資料です! Swift らしさってなんだろう、そんなところを API デザインガイドラインと Swift 標準ライブラリの表現に着目して 7 つほど紹介してみました。あくまでも "指針" なので『そういう風に考えていくのね』みたいに捉えて、そこからは "自分らしい" 言葉を紡いでいってくれたらいいのかなって思います。
iOS オールスターズ2でお話しした資料です! Swift らしさってなんだろう、そんなところを API デザインガイドラインと Swift 標準ライブラリの表現に着目して 7 つほど紹介してみました。あくまでも "指針" なので『そういう風に考えていくのね』みたいに捉えて、そこからは "自分らしい" 言葉を紡いでいってくれたらいいのかなって思います。
The document discusses Swift features related to variables, functions, and protocols. It provides examples of using var and inout keywords to pass variables by reference into functions. It also demonstrates defining generic functions that accept parameters and return functions.
The document discusses Swift features related to variables, functions, and protocols. It provides examples of using var and inout keywords to pass variables by reference into functions. It also demonstrates defining generic functions that accept parameters and return functions.
Kpatch is a tiny live-patching tool/function for linux kernel which is under development. This explains how the kpatch kernel module works in Japanese.
2019/12/25 に開催した「みんなで Swift 復習会 GO! in 札幌」で使用した資料です。主にオープニング用の資料で、本編で使ったスライドは僅かで現場にいないと役に立たないかもしれませんが、何かの参考用に公開します。
実際の現場で使った本編資料は2ページですけれど、話が脱線する中で詳細に触れた項目が記載されていたページも数ページですけれど公開しておきました。
2018/11/09 の Swift 愛好会の LT で『Swift の let した変数に値を再代入してみよう』という問題提起をするのに使ったオープニング的なスライドです。
このスライドに「解答」は含まれていないので、この話題をきっかけにあれこれ試行錯誤して、さらにはそこから『どうして2回、代入することができたのか』みたいな理由を考える糸口にしてもらえたら嬉しいです。
This code snippet shows two switch statements in Swift. The first switch statement matches on a variable v and prints different outputs depending on which pattern matches. The second switch statement matches on a device variable and can match multiple patterns on one case or use a where clause to check for a suffix, printing outputs accordingly.
The document discusses control flow statements in Swift including if/else statements to check conditions, switch statements to check multiple options, and looping statements like for-in, while and repeat-while. It also provides examples of if let to safely unwrap optionals and the nil coalescing operator ?? to handle nil values.
53. // 最初のインデックス
var startIndex: Index { get }
// 最後の次のインデックス
var endIndex: Index { get }
// 指定したインデックスに該当する要素
subscript (position: Index) -> _Element { get }
54. // 最初のインデックス
var startIndex: Index { get }
// 最後の次のインデックス
var endIndex: Index { get }
// 指定したインデックスに該当する要素
subscript (position: Index) -> _Element { get }
// あるインデックスの次のインデックスを取得
func index(after i: Index) -> Index
110. switch (value1, value2) {
case let (value?, nil), let (nil, value?):
return value
case let (value1?, value2?):
return value1 + value2
case (nil, nil):
return 0
}