Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Swiftにもasync/awaitがやって来る!

 Swiftにもasync/awaitがやって来る!

Swift/Kotlin合同勉強会 #2 の発表資料です。

B6ce8bebf30b97bac7624b0c6622352e?s=128

Kazuhiro Sakamoto

November 21, 2017
Tweet

Transcript

  1. 4XJGUʹ΋BTZODBXBJU͕ ΍ͬͯདྷΔʂ@kazu0620

  2. ࣗݾ঺հ ໊લ!LB[V ࡔຊ࿨େ ॴଐ &JHIUͱ͍͏໊ࢗΞϓϦͷ։ൃΛͯ͠·͢ɻ ࡢ೔͔Β"OESPJEଆͷ։ൃ΋࢝Ί·ͨ͠ɻ 4XJGUྺ೥ɻ,PUMJOྺ೔ɻ

  3. ,PUMJO 4VQQPSU$PSPVUJOFT

  4. ίϧʔνϯͬͯԿʁ ్தͰதஅͨ͠Γ࠶։ͨ͠ΓͰ͖Δؔ਺ʂ Կ͕خ͍͠ͷʁ ྫ͑͹BTZODBXBJUύλʔϯͷ࣮ݱɻඇಉظॲཧΛ ಉظతʹهड़͢Δ͜ͱ͕Ͱ͖ίʔυͷݟ௨͠ྑ͘Ͱ͖Δɻ

  5. Kotlin+AndroidͰasync/await(kkagurazaka) ΑΓ https://qiita.com/k-kagurazaka@github/items/702c92bc3381af36db12 ,PUMJOͷBTZODBXBJUͷྫ

  6. BTZODBXBJU͸͜Μͳ࣌ศར͔΋ʁ ඇಉظॲཧͷ$BMM#BDL஍ࠈΛԿͱ͔͍ͨ͠ 3YΛ࢖͏΄Ͳෳࡶͳ͜ͱΛ͢ΔΘ͚Ͱ͸ͳ͍ ཉ͍͠ͷ͸1SPNJTFͷΑ͏ͳ΋ͷ͚ͩ ͦͷͨΊʹ֎෦ͷϥΠϒϥϦೖΕΔͷ΋ʜ

  7. ,PUMJOͱ4XJGU͸ࣅͨݴޠ͍ͬͯ͏ΑͶ ,PUMJO΍ͬͯΔͷͰ4XJGU΋ॻ͍ͯΈΑ͏͔ͳʁ

  8. ͋Εʜ4XJGUʹ͸ʜʁ 4XJGUʹ͸ίϧʔνϯͳ͍ͷʜ

  9. None
  10. ࣮͸ݱࡏɺ$ISJT-BUUOFSʹΑͬͯ·ͱΊ ΒΕͨ1SPQPTBMͷ૲Ҋ্͕͕͍ͬͯΔʂ https://gist.github.com/lattner/429b9070918248274f25b714dcfc7619

  11. ͋ͱ෼Ͱ෼͔Δʂ 4XJGUͷBTZODBXBJU ˞·ͩਖ਼ࣜͳ1SPQPTBMͰ΋ͳ͍ͷͰɺ࣮ࡍʹಋೖ͞ΕΔ΋ͷͱ͸ҟͳΔՄೳੑ΋େ͍ʹ͋Γ·͢ ˞4XJGUͰಋೖ͞Εͯཉ͍͠΋ͷͷɺಋೖ͞ΕΔͱஅݴ͸Ͱ͖ͣ

  12. ,PUMJOͷίϧʔνϯ 4XJGUͷίϧʔνϯ ͋͘·ͰBTZODBXBJUͷ࣮૷ͷΈͰ͋Γɺͦͷ࣮ݱ ͷͨΊʹίϧʔνϯͱ͍͏֓೦Λ༻͍͍ͯΔ ίϧʔνϯͱ͍͏֓೦͕ݴޠϨϕϧͰαϙʔτ͞Ε͓ͯΓɺ ͦΕΛར༻࣮ͨ͠૷ύλʔϯͷҰछͱͯ͠BTZDBXBJU΋͋Δ

  13. $PNQMFUJPO)BOEMFSΛ Θ͔Γ΍͘͢ॻ͚Δ 4ZOUBY4VHFSͷΑ͏ͳ΋ͷ 4XJGUͷίϧʔνϯ

  14. None
  15. None
  16. None
  17. BTZOD UISPXTͬΆ͍ UISPXT͸ɺ͜ͷؔ਺͸ྫ֎Λ౤͛·͢Αͬͯҙຯ BTZOD͸ɺ͜ͷؔ਺͸ඇಉظॲཧͰ͢Αͬͯҙຯ

  18. None
  19. None
  20. BXBJU USZͬΆ͍ BXBJU͸ίϧʔνϯΛதஅ͢Δ BXBJUͨ͠ඇಉظॲཧ͕׬ྃ͢Ε͹ίϧʔνϯ͸ ࠶։͞ΕΔ

  21. None
  22. None
  23. None
  24. None
  25. None
  26. None
  27. Ͳ͏΍ͬͯίϧʔνϯΛ ։࢝͢Δͷ͔ʁ

  28. None
  29. None
  30. None
  31. None
  32. None
  33. $PNQMFUJPO)BOEMFSΛ Ͳ͏΍ͬͯBTZODͳ ϝιουʹ͢Δͷʁ

  34. None
  35. None
  36. None
  37. None
  38. None
  39. ·ͱΊ ,PUMJOͰ͸ίϧʔνϯͱ͍͏֓೦͕αϙʔτ͞Ε͍ͯΔ ίϧʔνϯΛར༻࣮ͨ͠૷ύλʔϯBTZODBXBJU͕ศར 4XJGUͰ΋BTZODBXBJUಋೖͷٞ࿦͕ਐΜͰ͍Δ 1SPNJTFతͳ΋ͷΛखܰʹ࢖͍͍ͨͳΒBTZODBXBJU Ͱྑ͍ͷͰ͸ʁ

  40. ͱ͍͏Θ͚Ͱ 4XJGUΛָ͠Έʹ଴ͪ·͠ΐ͏

  41. ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠