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
わいわいOperator
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
giginet
PRO
September 12, 2018
Programming
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
わいわいOperator
https://iosdiscord.connpass.com/event/97606/
giginet
PRO
September 12, 2018
More Decks by giginet
See All by giginet
🀄️ on swiftc
giginet
PRO
0
510
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
390
Claude Codeログ基盤の構築
giginet
PRO
7
4.4k
Inside of Swift Export
giginet
PRO
1
2.8k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
2.7k
SwiftでMCPサーバーを作ろう!
giginet
PRO
3
440
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.6k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
7.9k
5分でわかるExplicitly Built Modules
giginet
PRO
2
1.8k
Other Decks in Programming
See All in Programming
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
550
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
310
3Dシーンの圧縮
fadis
1
770
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
130
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
250
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.6k
Contextとはなにか
chiroruxx
1
320
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
4
800
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
610
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
570
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
240
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
230
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Optimizing for Happiness
mojombo
378
71k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
GraphQLとの向き合い方2022年版
quramy
50
15k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
940
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Bash Introduction
62gerente
615
220k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Transcript
Θ͍Θ͍Operator Θ͍Θ͍swiftc #5 @giginet
iOSDCͷLT !
• Protocol Extension͔ΒᤈࢠΛੜ͢Έ͍ͨͳωλΛͬͨ
͜Εpostfix operatorͰͰ͖ͳ͍ͷʁ !
import Foundation import Peafowl postfix operator ᤈ extension Int {
postfix static func ᤈ(lhs: Int) -> Tile { return Tile(.character(lhs))! } } 1ᤈ
None
ແཧͦ͏
ύʔαʔΛಡΉ • https://github.com/apple/swift/blob/master/include/swift/AST/ Identifier.h#L94
/// isOperatorStartCodePoint - Return true if the specified code point
is a /// valid start of an operator. static bool isOperatorStartCodePoint(uint32_t C) { // ASCII operator chars. static const char OpChars[] = "/=-+*%<>!&|^~.?"; if (C < 0x80) return memchr(OpChars, C, sizeof(OpChars) - 1) != 0; // Unicode math, symbol, arrow, dingbat, and line/box drawing chars. return (C >= 0x00A1 && C <= 0x00A7) || C == 0x00A9 || C == 0x00AB || C == 0x00AC || C == 0x00AE || C == 0x00B0 || C == 0x00B1 || C == 0x00B6 || C == 0x00BB || C == 0x00BF || C == 0x00D7 || C == 0x00F7 || C == 0x2016 || C == 0x2017 || (C >= 0x2020 && C <= 0x2027) || (C >= 0x2030 && C <= 0x203E) || (C >= 0x2041 && C <= 0x2053) || (C >= 0x2055 && C <= 0x205E) || (C >= 0x2190 && C <= 0x23FF) || (C >= 0x2500 && C <= 0x2775) || (C >= 0x2794 && C <= 0x2BFF) || (C >= 0x2E00 && C <= 0x2E7F) || (C >= 0x3001 && C <= 0x3003) || (C >= 0x3008 && C <= 0x3030); }
None
·ͱΊ • operatorͰ͑Δจࣈίʔυܾ·ͬͯΔ • ϙϯυoperatorʹͰ͖Δ͕ɺϢʔϩoperatorʹͰ͖ͳ͍ • ଞʹ͋Δ͔
ΦϚέ • ࣮ṛશͯUnicodeʹׂΓͯΒΕ͍ͯΔ • ͜ΕΦϖϨʔλʔʹͰ͖ͳ͍ʁ
ແཧͩͬͨ
ΦϚέ2 • ṛΛఆ͢ΔCharacterSetͰ͢ import Foundation public let MahjongTileCharacterSet = {
() -> CharacterSet in let start = Character("").unicodeScalars.first! let end = Character("").unicodeScalars.first! let range: ClosedRange<Unicode.Scalar> = start...end return CharacterSet(charactersIn: range) }()