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

iosdcrc_operator

 iosdcrc_operator

Swiftは何故か郵便屋さんを採用している話です #iOSDCRC

Shigure Shimotori

October 13, 2017
Tweet

More Decks by Shigure Shimotori

Other Decks in Programming

Transcript

  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
  3. 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
  4. ࣍ͷจࣈ͸ԋࢉࢠʹ࢖͑Δͷ͔ʁ ֆจࣈ͔Ͳ͏͔ ԋࢉࢠʹ࢖͑Δ͔ ὺ ˟ ˜ š ℗ ™ ℠

    ֆจࣈ͔Ͳ͏͔ ԋࢉࢠʹ࢖͑Δ͔ ὺ O : ˟ O : ⁴ O O ˜ : : š : : ℗ O O ä : O ℠ O O