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
660
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
220
1人で挑むSwiftコンパイラ 〜型システム入門編〜
s_shimotori
0
790
英語
s_shimotori
1
710
Parallel Socket Communication in Swift
s_shimotori
1
750
UIColor Anatomy
s_shimotori
1
2.4k
UIColor Cluster
s_shimotori
1
740
iOSDC Japan 2019 60 mins for color
s_shimotori
5
3.8k
wwdc19
s_shimotori
2
370
SE-0246 Generic Math(s) Functions
s_shimotori
2
2.5k
Other Decks in Programming
See All in Programming
2025/3/18 サービスの成長で生じる幅広いパフォーマンスの問題を、 AIで手軽に解決する
shirahama_x
0
160
goにおける コネクションプールの仕組み を軽く掘って見た
aronokuyama
0
140
OUPC2024 Day 1 解説
kowerkoint
0
400
Node.js, Deno, Bun 最新動向とその所感について
yosuke_furukawa
PRO
6
3k
GDG Super.init(version=6) - From Where to Wear : 모바일 개발자가 워치에서 발견한 인사이트
haeti2
0
560
ニックトレイン登壇資料
ryotakurokawa
0
140
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
5
830
PHPer's Guide to Daemon Crafting Taming and Summoning
uzulla
2
1.1k
AI Agents with JavaScript
slobodan
0
130
PsySHから紐解くREPLの仕組み
muno92
PRO
1
520
アーキテクトと美学 / Architecture and Aesthetics
nrslib
12
3.1k
Firebase Dynamic Linksの代替手段を自作する / Create your own Firebase Dynamic Links alternative
kubode
0
180
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
28
1.6k
How STYLIGHT went responsive
nonsquared
99
5.4k
How GitHub (no longer) Works
holman
314
140k
Building Adaptive Systems
keathley
41
2.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Designing for humans not robots
tammielis
251
25k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
The World Runs on Bad Software
bkeepers
PRO
67
11k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
12
1.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Designing for Performance
lara
606
69k
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