タグ

swiftに関するJxckのブックマーク (4)

  • State, Promises & Reactive Programming

    About the content This content has been published here with the express permission of the author. Promises are a well-known design pattern used to delay evaluation of future values, and to pipeline operations in an asynchronous manner. Typically, there are three internal states used to control the behavior of promises, but there is a lack of core interfaces essential to iOS & OS X development. To

    State, Promises & Reactive Programming
  • Swift 2.0 の try, catch ファーストインプレッション - Qiita

    WWDC 2015 で Swift 2.0 が発表されました。オープンソース化などのうれしいニュースでも盛り上がっていますが、言語仕様としては try, throw, catch が導入されるという大きな変更がありました。投稿は、 The Swift Programming Language の新章 Error Handling を読み、多少のコードを書いた上での個人的な感想です。 結論から言うと、 try, catch の導入は良い変更だと思えないけど、 try, catch を導入する前提なら考え得る限りベストに近い仕様だった、って感じです。 よかったのは、 ErrorType は enum タイプセーフなエラー情報 エラー処理が強制されている(検査例外のような形) try! でエラーを無視できる あたりです。個人的には、 try, catch でなく Either 的なものを公式サ

    Swift 2.0 の try, catch ファーストインプレッション - Qiita
    Jxck
    Jxck 2015/06/10
    新しい言語でも try-catch は入ってくるんだなぁ。
  • Welcome to Swift

    Welcome to Swift Swift is a new object-oriented programming language for iOS and OS X development. Swift is modern, powerful, and easy to use. let people = ["Anna": 67, "Beto": 8, "Jack": 33, "Sam": 25] for (name, age) in people { println("\(name) is \(age) years old.") } Safe Swift pairs increased type safety with type inference, restricts direct access to pointers, and automatically manages memo

    Welcome to Swift
    Jxck
    Jxck 2014/06/03
  • 新しいプログラミング言語 Swift | DevelopersIO

    Objective-Cに替わる新しいプログラミング言語Swiftの登場 WWDC2014で発表された新しいプログラミング言語Swiftでできることを紹介したいと思います。 今までとこれから Swift使うとこんなにコードが短くなるぜという例です。 今まで これから 確かにスマートですね。 言語ガイドをダウンロード iBookでガイドを読めますのでダウンロードしてみましょう。 変数の宣言 varは変数、letは定数 var myVar = 42 myVar = 50 let myConst = 42 コントロール if,switch,for-in,for,while,do-while let individualScores = [76, 43, 103, 87, 12] var teamScore = 0 for score in individualScores { if score >

    新しいプログラミング言語 Swift | DevelopersIO
    Jxck
    Jxck 2014/06/03
    確かに、 ObjectiveC より覚えるのは楽そう。
  • 1