Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
iosdcrc_operator
Search
Shigure Shimotori
October 13, 2017
Programming
1
640
iosdcrc_operator
Swiftは何故か郵便屋さんを採用している話です #iOSDCRC
Shigure Shimotori
October 13, 2017
Tweet
Share
More Decks by Shigure Shimotori
See All by Shigure Shimotori
Synchronizationを支える技術
s_shimotori
1
190
1人で挑むSwiftコンパイラ 〜型システム入門編〜
s_shimotori
0
680
英語
s_shimotori
1
600
Parallel Socket Communication in Swift
s_shimotori
1
700
UIColor Anatomy
s_shimotori
1
2.4k
UIColor Cluster
s_shimotori
1
710
iOSDC Japan 2019 60 mins for color
s_shimotori
5
3.7k
wwdc19
s_shimotori
2
350
SE-0246 Generic Math(s) Functions
s_shimotori
2
2.4k
Other Decks in Programming
See All in Programming
為你自己學 Python
eddie
0
520
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
390
情報漏洩させないための設計
kubotak
5
1.3k
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
300
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
950
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
AHC041解説
terryu16
0
400
ドメインイベント増えすぎ問題
h0r15h0
2
570
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
100
PicoRubyと暮らす、シェアハウスハック
ryosk7
0
220
PHPカンファレンス 2024|共創を加速するための若手の技術挑戦
weddingpark
0
140
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Why Our Code Smells
bkeepers
PRO
335
57k
Building Adaptive Systems
keathley
38
2.4k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
BBQ
matthewcrist
85
9.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
Automating Front-end Workflow
addyosmani
1366
200k
Done Done
chrislema
182
16k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Transcript
iOSDC 2017 Reject Conference day1 ༣ศ͞Μͷԋࢉࢠ @S_Shimotori
ͩΕ • @S_Shimotori / @S_Shimotori_pub • ͭΒֶ͍ੜ • iOSDCؔ3
Custom Operators
ԋࢉࢠΛࣗ࡞ʂͨͷ͍͠ʂ • xmartlabs/Eureka • ϑΥʔϜϏϧμʔ • +++ͰSectionΛՃ͢ΔͳͲ • thoughtbot/Runes •
HaskellͰݟͨΑ͏ͳԋࢉࢠ͕͑ΔΑ͏ʹͳΔ
ͲΜͳԋࢉࢠ͕࡞ΕΔͷ͔ʁ
͜ΕΛݟ͓͚ͯᘳͰ͢ʂ
ͳΜͱͳʙ͘๏ଇ͕͋Δʂ
๏ଇͦͷ1
ͦͷ1: ͑ͦ͏ͳASCIIจࣈ͑Δ • ݟͨ͜ͱ͋ΔͷͰ΄΅શͯ • ڍ͛ΒΕ͍ͯͳ͍จࣈΛݟΕೲಘ͔ʁ • ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹෆՄ • ɹ
dot operatorͰ༻Մ l 4USJOH-JUFSBMͰ༻ b LFZXPSEͷઌ಄Ͱ༻ JGͳͲ JNQMJDJUOBNFEQBSBNFUFSTͰ༻ ͳͲ \^ UVQMFɼGVODUJPOͳͲͰ༻ <> BSSBZMJUFSBMͳͲͰ༻ ܕͷݺͼग़͠ɼ࿈ଓ͢ΔPQFSBUPSͷׂͳͲͰ༻ ۠Γͱͯ͠༻ ! BUUSJCVUFͰ༻ !BWBJMBCMFͳͲ a Τεέʔϓ,FZ1BUI&YQSFTTJPOͰ༻ @ XJMEDBSEQBUUFSOͰ༻ A ༧ޠΛJEFOUJpFSʹ༻͍Δ࣌ʹ༻
๏ଇͦͷ2
ͦͷ2: identifierͰ͑Δจࣈجຊతʹ͑ͳ͍ • identifierͱoperatorผ • ઐ༻ͷΤϥʔ͕ଘࡏ͢Δ • • ͪΖΜΞϧϑΝϕοτࣈ༻ෆՄ •
༻ෆՄ ·Ί͖ͪ͠: ͜ͷΤϥʔจ۟ʮidentifier_when_expecting_operatorʯͷ໊Ͱ͔ͬ͠ΓSwiftʹ࣮͞Ε͍ͯ·͢ https://github.com/apple/swift/blob/bf42def404abcc9239cf7856475da2c80b86cc70/include/swift/AST/DiagnosticsParse.def#L421
❌ U+3008-U+3020, U+3030 ൣғμϒͬͯΔ͡ΌΜʁ U+3021-U+302Fɹ͕ ·Ί͖ͪ͠: U+3021-U+3029ોभ߸ᛰͱ͍͏ࣈɼU+302A-U+302Fͱ͔ූͱ͔ݺΕΔͷɽཁதࠃޠɽ ͱ͍͏͔U+3000-U+303Fࣗମ͕CJK Symbols and
Punctuationͱ͍͏ΧςΰϦɽ
๏ଇͦͷ3
ͦͷ3: ֶه߸͕݁ߏ͑Δ • ҹͱֶ͔ه߸ͱ͔͕·Δͬͱ͑Δ • mattt/Eulerͱ͍͏ϥΠϒϥϦ(?)͕͋Δ͘Β͍ • ɹɹɹɹ͑ͳ͍ ΄͔ଟ ਖ਼֬ʹ͍͏ͱɼUnicodeͰʮArrowsʯʮMathematical
OperatorsʯʮMiscellaneous TechnicalʯϒϩοΫͱݺΕ͍ͯΔͱ͜Ζ͕ ·Δ·Δ༻Մೳʹͳ͍ͬͯΔ
๏ଇͦͷ4
ͦͷ4 : ҙ֎ͱׅހϓϥΠϜ͕͑ͪΌ͏ • ASCIIจࣈͰμϝͰɼࣅͨจࣈ͕͑Δ͜ͱ͕͋Δ • • • • ٯʹ͍͏ͱׅހΫΥʔτͷྨม໊ʹ͑ͳ͍
๏ଇͦͷ5
ͦͷ5: ԋࢉࢠʹ͑Δֆจࣈ͋Δ • ͑ΔͷU+3030·ͰͷจࣈͷҰ෦ͱࢥͬͯOK • U+1F436ɼU+1F42E • ֆจࣈͷଟ͘U+1F000Ҏ߱Ͱൣғ֎ • U+3030Ҏલʹ͋Δֆจࣈ͑Δ͔ʂ
U+3030·ͰͷͲΕ͕ֆจࣈͳͷ͔ • The Unicode Consortium͕ܾΊ͍ͯΔ • ΄ͱΜͲ͕͑ΔͷͰɼҰཡΛݟͯωλΛ࿅Δͱྑ͠ • ͑ͳ͍ࢠ: •
U+FE0FͱU+FE0E͕ԋࢉࢠ໊ͷ2จࣈҎ߱Ͱ͑Δ • ͭ·ΓֆจࣈελΠϧͱςΩετελΠϧผѻ͍ Ұཡ http://unicode.org/Public/emoji/5.0/emoji-data.txt https://ja.wikipedia.org/wiki/Unicode%E3%81%AEEmoji%E3%81%AE%E4%B8%80%E8%A6%A7
͍͍ͩͨ͜Μͳײ͡ʂ
·ͱΊ • ͑ͦ͏ͳASCIIจࣈ͑Δ • identifierͰ͑Δจࣈجຊతʹ͑ͳ͍ • ֶه߸͕݁ߏ͑Δ • ҙ֎ͱׅހϓϥΠϜ͕͑Δ •
ಉ͡छྨͷจࣈ͕શ෦͑ΔΘ͚Ͱͳ͍ • ԋࢉࢠʹ͑Δֆจࣈ͋Δ
࠷ޙʹ͏1ͭ
࣍ͷจࣈԋࢉࢠʹ͑Δͷ͔ʁ ֆจࣈ͔Ͳ͏͔ ԋࢉࢠʹ͑Δ͔ ὺ ˟ ℗ ™ ℠
ֆจࣈ͔Ͳ͏͔ ԋࢉࢠʹ͑Δ͔ ὺ O : ˟ O : ⁴ O O : : : : ℗ O O ä : O ℠ O O
Θ͔ΒΜʂʂʂ
None