---
title: みんなで Swift 復習会での談笑用スライド – 3rd #minna_de_swift
tags:  #みんなでswift復習会  
author: [熊谷友宏](https://docswell.com/user/es_kumagai)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/3EKDVW4LJD.jpg?width=480
description: みんなで Swift 復習会 (http://cswift.connpass.com) の談笑で使った資料です。これを題材に２時間ばかり、集まったみんなと談笑しました。  ※ Docswell での公開に移行する直前の Slideshare での閲覧数は 441 でした。
published: November 07, 16
canonical: https://docswell.com/s/es_kumagai/KXEWG3-03-161106155051
---
# Page. 1

![Page Image](https://bcdn.docswell.com/page/3EKDVW4LJD.jpg)

ΈΜͳͰ4XJGU෮शձ
5IF#BTJDT ʜୈ̐ஈམ໨͔Β

ΧδϡΞϧ4XJGUϓϩάϥϛϯά
&amp;;/&amp;5‫۽‬୩༑޺
IUUQF[OFUKQ
4XJGU


# Page. 2

![Page Image](https://bcdn.docswell.com/page/L73RM1L6J5.jpg)

5IF#BTJDT
ୈ̐ஈམ໨͔Β


# Page. 3

![Page Image](https://bcdn.docswell.com/page/87DY6XNM7G.jpg)

‫ܕ͍͠৽‬


# Page. 4

![Page Image](https://bcdn.docswell.com/page/VJP6YP5QE8.jpg)

৽͍͠‫ܕ‬
5VQMF λϓϧ
⾣ ෳ਺ͷ஋Λάϧʔϐϯά
⾣ ͻͱͭͷ஋ͱͯ͠ɺؔ਺ͷ໭Γ஋ʹ࢖͑Δ
⾣ ଋͶͯɺ·ͱΊͯ୅ೖͨ͠ΓͰ͖Δ
let tuple: (Int, String) = (200, &quot;OK&quot;)
func request(_ path: String)
-&gt; (status: Int, message: String) {
return (200, &quot;OK&quot;)
}
let (status, message) = request(&quot;path&quot;)


# Page. 5

![Page Image](https://bcdn.docswell.com/page/2EV3G2PP7Q.jpg)

৽͍͠‫ܕ‬
0QUJPOBM Φϓγϣφϧ
⾣ ஋͕ଘࡏ͠ͳ͍ɺ͜ͱΛද‫͖Ͱݱ‬Δ
⾣ ԿΒ͔ͷ஋͕༗Δ͔ɺͦΕͱ΋ແ͍͔
⾣ 0CKFDUJWF$ͷOJMͱҧͬͯɺ஋‫ܕ‬΋ද‫͖Ͱݱ‬Δ
enum Optional&lt;Wrapped&gt; : ExpressibleByNilLiteral {
case none
case some(Wrapped)
}


# Page. 6

![Page Image](https://bcdn.docswell.com/page/57G38RPQJL.jpg)

ม਺
0QUJPOBM͸4XJGUͷத֩
⾣ 0CKFDUJWF$ͷOJMΑΓɺ҆શͰɺද‫͕ྗݱ‬๛͔
w ஋͕ͳ͍ՄೳੑΛɺ͸͖ͬΓࣔͤΔ
w ஋͕ͳ͍৔߹ͷɺ൑அΛഭΔ
⾣ ‫ʹޠݴ‬ΑΔɺ๛෋ͳ0QUJPOBMαϙʔτ
w ‫ܕ‬ఆٛͷ౶ҥߏจ
w ‫੍ڧ‬Ξϯϥοϓ &#039;PSDFE6OXSBQQJOH 
w ΦϓγϣφϧόΠϯσΟϯά 0QUJPOBM#JOEJOH 
w ΦϓγϣφϧνΣΠχϯά 0QUJPOBM$IBJOJOH 
w OJM݁߹ԋࢉࢠ /JMDPBMFTDJOH0QFSBUPS 
w ‫ڞ‬มੑ


# Page. 7

![Page Image](https://bcdn.docswell.com/page/4EQ59V2WJP.jpg)

‫҆ܕ‬શ


# Page. 8

![Page Image](https://bcdn.docswell.com/page/KJ49XML171.jpg)

‫҆ܕ‬શ
‫҆ܕ‬શͳ‫ޠݴ‬
l4XJGUJTBUZQFTBGFMBOHVBHF 
XIJDINFBOTUIFMBOHVBHFIFMQTZPV
UPCFDMFBSBCPVUUIFUZQFTPGWBMVFT
ZPVSDPEFDBOXPSLXJUIz
ग़ల5IF4XJGU1SPHSBNNJOH-BOHVBHF 4XJGU
⾣ ίʔυΛॻ͘ࡍʹɺͦͷ஋ʹ‫ظ‬଴͞Ε͍ͯΔ‫ܕ‬Λɺ
4XJGU‫ͯࣔ͘͠ʹ֬໌͕ޠݴ‬ΕΔ


# Page. 9

![Page Image](https://bcdn.docswell.com/page/LE1KN8L5JG.jpg)

‫҆ܕ‬શ
‫҆ܕ‬શͳ‫ޠݴ‬
⾣ ద੾ͳ‫ܕ‬Λɺ‫͕ޠݴ‬ಋ͍ͯ͘ΕΔ
w จࣈྻΛ౉͢৔໘Ͱɺؒҧͬͯ΋਺஋Λ౉ͤͳ͍
w ஋͕ඞਢͳ৔໘Ͱɺແ͍஋Λ౉ͤͳ͍
⾣ ૣ͍ஈ֊ͰɺΤϥʔΛ‫ݕ‬ग़Ͱ͖Δ
w ࣮ߦ࣌Ͱ͸ͳ͘ɺϏϧυ࣌
w ‫ܕ‬νΣοΫ࣌ -JWF*TTVFT


# Page. 10

![Page Image](https://bcdn.docswell.com/page/GEWD4ZVWJ2.jpg)

‫҆ܕ‬શ
‫҆ܕ‬શͬͯԿͩΖ͏ʢ࿈૝ʣ
⾣ ‫ܕͳ֨ݫ‬νΣοΫ
w ໌ࣔ‫ܕ‬Ωϟετ͕‫ݪ‬ଇ
w ͨͩ͠ɺ҉໧ม‫׵‬ɺ‫੍ڧ‬ม‫׵‬΋͋Δ
⾣ ಉ͡‫ܕ‬ಉ࢜Ͱԋࢉ͢Δ‫ݪ‬ଇ
⾣ ‫ܕ‬ຊਓ͕੹೚Λ࣋ͭ
⾣ ϓϩτίϧͰ‫ܕ‬ͷৼΔ෣͍Λ‫ن‬ఆ͢Δ
⾣ ৼΔ෣͍͕Θ͔Δͱɺ‫ܕ‬ΛͲ͏࢖͑͹ྑ͍͔෼͔Δ
⾣ ‫ܕ‬ͷද‫ྗݱ‬
w δΣωϦοΫ
w Մมੑͱෆมੑ
w ϙϦϞʔϑΟζϜ


# Page. 11

![Page Image](https://bcdn.docswell.com/page/47ZG2142E3.jpg)

ΈΜͳͰ4XJGU෮शձ
&amp;OEJOH


# Page. 12

![Page Image](https://bcdn.docswell.com/page/YJ6YVLG67V.jpg)

&amp;OKPZ4XJGU
5IBOLZPV
ΈΜͳͰ4XJGU෮शձ
5IF#BTJDT
&amp;;/&amp;5‫۽‬୩༑޺
IUUQF[OFUKQ
⾣
λϓϧɺΦϓγϣφϧ
⾣
‫҆ܕ‬શʹ͍ͭͯ


