Hatena Engineer Seminar #9 @ Tokyoでの発表資料です #hatenatech https://hatena.connpass.com/event/69844/
単純なstructにCodableを適用しただけのコードです。これをSwift4のコンパイラに食わせて-print-astで字句構文解析&型チェック後の抽象構文木をPretty-Printさせてみます。 internal struct Comic : Codable { internal let title: String internal let volume: Int internal init(title: String, volume: Int) private enum CodingKeys : CodingKey { case title case volume internal var stringValue: String { get } internal init?(stringValue: String) internal var intValue: Int? { ge
今日したこんなツイートの補足ツイートをしようとしつつ、やや長くなりそうなので、プチ記事にしました( ´・‿・`) aa上の例は、「caseを使わずとも guard payload.aps.category == .dog else { return } と書けば良いのに」と思われそうで、確かにそう書ける時はそれがベターかなと思っています。 改めて書くと、次のような感じです。 enum Animal { case 🐶, 🐱 } let animal = Animal.🐶 if animal == .🐶 { print("イッヌ🐶") }では、次のように associated valueをもつ列挙型の時はどうでしょうか? enum Animal2 { case 🐶(name: String), 🐱 }let animal2 = Animal2.🐶(name: "mono") i
この記事は2017/04/15(土)のSwift Tweetsで発表した内容です。 Swift 4では何が変わるのか Swift4に関しては、Swift.orgやswift-evolutionで毎日情報が流れていますが、僕自身ちゃんとキャッチアップできていませんでした。今日は出来るだけリソースを提示しながらお話したいと思います。 Swift4が何を目指しているのかはここに記載されています。https://goo.gl/5XSu7M Swift4は今年2017年の下期のリリースを目標に開発が進んでいます。Swift4には2つ目標があります。一つはSwift3のソースコードの安定性の提供、もう一つは、標準ライブラリのABI安定性の提供です。 Swift 3のコードの安定性の向上 標準ライブラリのABIの安定化 この2つの目標達成のために、開発を2段階に分けています。 Stage 1 ソース
If you haven’t been following the Swift Evolution Process closely, keep reading – this article is for you! In this article, I’ll highlight the most significant changes in Swift 3.1 which will have a major impact on your code. Let’s dive in! :] Getting Started Swift 3.1 is source-compatible with Swift 3.0, so the new features won’t break your code if you’ve already migrated your project to Swift 3.
白ヤギリードアーキテクトの伊藤です。 3/2〜4にtry! Swift Tokyo 2017が開催され、そして今回、Apple以外のプラットフォームでのSwift活用法についてお話しました。 前回サーバーサイドSwiftでの記事を書いてから、しばらくぶりになりましたが、近況を簡単に報告することができました。 Swiftのオープンソース化から1年半ほどたちましたが、状況も様々変わりました。 スライドはこちらです。 ビデオもRealmのサイトでのちほど公開される予定です。 スライドで触れたライブラリなどは以下で公開しています。 novi/mysql-swift novi/nkf-swift novi/mecab-swift また、カンファレンス当日は、多くの方にオフィスアワーに来ていただきましたが、 ラズベリーパイ上でのSwiftの反響が予想よりも大きかったように思います。 このSwiftは現
twitter.com Swift offers remarkable performance while still providing safety through strong types, value semantics, and automatic memory management. For those times when you need to step outside those boundaries, however, Swift also offers tools to directly allocate and manipulate memory. This talk will explore the ins and outs of Swift’s take on pointers: typed and raw pointers and buffers, impli
Ted Kremenek is a member of the Swift Core Team and manages the Languages and Runtimes group at Apple. This post describes the goals, release process, and estimated schedule for Swift 4. Swift 4 is a major release that is intended to be completed in the fall of 2017. It pivots around providing source stability for Swift 3 code while implementing essential feature work needed to achieve binary stab
This post originally appeared on Medium. Because closures make ugly couples If you hadn’t already heard, closures are a great tool to utilise in your Swift code. They’re first-class citizens, they can become trailing closures if they’re at the end of an API and now they’re @noescape by default which is a massive win in the fight against reference cycles. But every once in a while we have to work w
技術部モバイル基盤グループの ヴァンサン です。 西山が 以前紹介したように 、クックパッドでは 2014 年から Swift を使っています。長い間、海外向けのアプリや みんなのお弁当 だけに使われていましたが、去年の5月から、 クックパッド iOS アプリ の開発にも Swift を使うようになりました。歴史のある iOS アプリなので Objective-C でのコードの方がまだ多いのですが、いまは既存の画面の変更を除いて新しいコードが Swift で書かれています。既存の画面を Swift で書き直すこともあります。 Xcode 8.0 がリリースされてから数ヶ月 Swift 2 を使っていましたが、去年の12月のリリース直後に Swift 3 へのマイグレーションをしてから、開発で Swift 3 を使っています。2017年2月1日にリリースされた 17.1.1.0 が Swif
2017年2月7日紙版発売 2017年2月7日電子版発売 石川洋資,西山勇世 著 A5判/464ページ 定価3,520円(本体3,200円+税10%) ISBN 978-4-7741-8730-3 ただいま弊社在庫はございません。 Amazon 楽天ブックス honto ヨドバシ.com 電子版 Gihyo Digital Publishing 本書のサポートページサンプルファイルのダウンロードや正誤表など この本の概要 本書は,Swiftの言語仕様と実践的な利用方法を解説した入門書です。 Swiftは簡潔な言語ですが,その言語仕様を理解し,正しく使うことはけっして容易ではありません。Appleの公式ドキュメントをはじめとして,どんな言語仕様があり,それらをどのように使うかに関しては豊富な情報源があります。しかし,それらがなぜ存在し,いつ使うべきかについてまとまった情報があるとは言えません
About the content This talk was delivered live in September 2016 at try! Swift NYC. The video was recorded, produced, and transcribed by Realm, and is published here with the permission of the conference organizers. What do you do when you are ready to upgrade to Swift but rewriting your existing Objective-C apps is not an option? In this try!Swift talk, using Etsy as a case study, Amy discusses a
Swiftの実装をまとめた本ですが、Swiftのソースコードはほとんど登場しません! pdf版で60ページ程度のボリュームです。 2017/05/05にv1.3へ更新しました。誤字脱字の修正がメインです。 2016/12/29にv1.2へ更新しました。またDropbox Publicフォルダが2017/03/15廃止に伴いGoogleDriveへ変更しましたので、新URLを追記しています。 既に購入済みのユーザは2017/03/15までにv1.2を再取得して頂けると助かります。 はじめに 本書はSwiftの実装やコンパイラやRuntimeがどんな感じなのかなーと興味を持っている方を対象としており、 筆者が関心を持った点は以下のようになります。 (1) GitHubで公開されたSwiftに興味があり、ソースコードを読んで理解するための足がかりを作る (2) LLVMと連携しているSwiftに
技術部モバイル基盤グループの@giginetです。 我々のチームでは、iOS/Androidアプリの認証、決済、ロギングと言った基幹部分の開発のほか、各事業部のモバイルエンジニアの開発効率を上げるための業務改善を日々行っています。 その一環として、さまざまなモバイル開発上の指標を収集・監視し、問題の発見や、施策への効果計測に利用できるようにしています。 例として、iOS/AndroidのCIの実行時間や、開発期間中のissueの量の変化、コード全体のSwift対応率などがあります。 収集したデータは、オープンソースのデータビジュアライゼーションツールであるGrafana上にダッシュボードを作成し、監視しています。 この記事では、iOS版クックパッドアプリでビルド時間を計測、改善をした事例についてご紹介します。 コマンドごとの実行時間の計測 まず、CIサーバーで実行されている各Shellコマ
Memory management scares most developers when it doesn’t work as expected. Apple’s Automatic Reference Counting (ARC) magically handles most memory management we used to do manually, but still often needs guidance to work well. Swift provides us with cool tools like capture lists, unowned, and weak references to do so. In this talk, Hector Matos discusses memory leaks and retain cycles — how these
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く