$30 off During Our Annual Pro Sale. View Details »

Ruby の静的型チェックの話

Ruby の静的型チェックの話

2020-07-22 社内ゆるいRuby LT会

Yoshihide TANIGUCHI

July 22, 2020
Tweet

More Decks by Yoshihide TANIGUCHI

Other Decks in Technology

Transcript

  1. !SBWFMMM ࣾ಺ΏΔ͍3VCZ-5ձ 3VCZͷ੩తܕνΣοΫ

  2. 3VCZ w ϦϦʔε༧ఆ w 3VCZQϦϦʔε͕ w ͭͷϝΠϯΰʔϧ w +*5$PNQJMF $PODVSSFODZ

    ੩తղੳ
  3. ੩తղੳ w 3VCZίʔυΛ੩తղੳ͠ɺಘͨ৘ใͰ։ൃମݧΛվળ w UZQFBOOPUBUJPO͸෇༩͠ͳ͍ w UZQFQSPpMFS w IUUQTHJUIVCDPNNBNFSVCZUZQFQSPpMFS w

    ίʔυΛந৅ղऍͯ͠ܕ৘ใΛநग़ w ࣮ߦແ͠ʹΤϥʔͬΆ͍ՕॴΛఏࣔ
  4. ܕ৘ใͷهड़3#4 3VCZ4JHOBUVSF w 3VCZίʔυͱ͸ผʹܕΛهड़͢ΔϑΝΠϧʢ SCTʣ w 5ZQF4DSJQUʹ͓͚Δ EUTͷΑ͏ͳ΋ͷ w ඞਢͰ͸ͳ͍͠ɺᐆດͰ΋Α͍ʢ઴ਐతܕ෇͚ʣ

    w खॻ͖͢Δ͔UZQFQSPpMFSΛར༻ͯ͠ੜ੒ w ੜ੒ͨ͠ܕఆٛ͸ᐆດͳఆٛΛؚΈಘΔ w ੩తղੳͷ݈શੑɾ׬શੑΑΓ΋3VCZͷهड़ੑɾैདྷͱͷޓ׵ੑɾ࣮༻ੑ Λ༏ઌ
  5. 3#4ͷงғؾ IUUQTHJUIVCDPNTJEFSHPPEDIFDLCMPCSCTTJHHPPEDIFDLSCT

  6. ܕݕࠪ w 3#4ͷهड़ͱίʔυͱͷဃ཭Λݕࠪ w ܕݕࠪث͸3VCZʹ͸ಉࠝ͞Εͳ͍ w ܕݕࠪثͷ࣮૷ͱͯ͠4UFFQ 4PSCFUͳͲ͕͋Δ w IUUQTHJUIVCDPNTPVUBSPTUFFQ

    w IUUQTHJUIVCDPNTPSCFUTPSCFU
  7. ͦͷଞͷ։ൃମݧͷվળ w ܕݕࠪΛར༻ͨ͠ίʔυೖྗࢧԉ w 4UFFQ͕-BOHVBHF4FSWFSΛఏڙ͍ͯ͠Δ w 74$PEF͸ϓϥάΠϯ΋ w IUUQTHJUIVCDPNTPVUBSPTUFFQWTDPEF

  8. ॴײ w զʑ͕ීஈॻ͘ΞϓϦέʔγϣϯίʔυ͸΄΅੩తܕ෇͚ɾܕݕࠪͰ͖ΔΑ͏ʹͳΔͷͰ͸ w ܰ͘4UFFQΛૉৼΓͨ͠ײ͡ɺಈతʹఆٛ͞ΕΔϝιουʹ͍ͭͯ΋ݕࠪ͸Ͱ͖ͳ͍ͳ͕ ΒܕఆٛΛॻ͚Δ w ࣮ߦ࣌ʹੜ͑Δϝιουͷ͏ͪTJHOBUVSF΍໊લ͕໌Β͔ͳ΋ͷʢ3BJMTͷNPEFMʹ ੜ͑Δϝιουͱ͔ʣʹ͍ͭͯɺݺͼग़͠ݩΛܕݕࠪͨ͠Γίʔυॻ͘ͱ͖ʹิ׬͕ޮ ͍ͨΓ͢ΔͷͰ͸ʢະ֬ೝʣ

    w ಈతʹఆٛ͞ΕΔϝιουͷ͏ͪTJHOBUVSF΍໊લ͕ࣗ༝౓ͷߴ͍ೖྗʹԠܾͯ͡·Δ΋ͷ ʹ͍ͭͯ͸ݱঢ়Ͳ͏ʹ΋ͳΒͳͦ͏ʁ w ΞϓϦέʔγϣϯॻ͘ͱ͖ʹ௚઀৮ΕΔ૚ʹͦ͏͍͏ίʔυ͋Δͷ͔ͳ
  9. ϦϑΝϨϯε w IUUQTHJTUHJUIVCDPNSBWFMMM FGFFBBFDBDFDʹ·ͱΊ·ͨ͠