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

Why Elixir

mururu
March 07, 2014

Why Elixir

歌舞伎座.tech#3「Real World Erlang/OTP」

mururu

March 07, 2014
Tweet

More Decks by mururu

Other Decks in Programming

Transcript

  1. ͳͥ&MJYJSͳͷ͔
    Վ෣ب࠲UFDIʮ3FBM8PSME&SMBOH051ʯ
    !NVSVSVSVSV
    14೥3݄13೔໦༵೔

    View full-size slide

  2. ࣗݾ঺հ
    UXJUUFS!NVSVSVSVSV
    HJUIVC!NVSVSV
    14೥3݄13೔໦༵೔

    View full-size slide

  3. 3FBM8PSME
    14೥3݄13೔໦༵೔

    View full-size slide

  4. 3FBM8PSME
    14೥3݄13೔໦༵೔

    View full-size slide

  5. 3FBM8PSME
    14೥3݄13೔໦༵೔

    View full-size slide

  6. 14೥3݄13೔໦༵೔

    View full-size slide

  7. “Elixir is a functional, meta-programming
    aware language built on top of the Erlang
    VM. It is a dynamic language with flexible
    syntax and macro support that leverages
    Erlang's abilities to build concurrent,
    distributed and fault-tolerant applications
    with hot code upgrades.”
    14೥3݄13೔໦༵೔

    View full-size slide

  8. &SMBOH7.
    14೥3݄13೔໦༵೔

    View full-size slide

  9. &SMBOH7.
    051
    14೥3݄13೔໦༵೔

    View full-size slide

  10. &MJYJS&SMBOH
    JOUFHFS
    MJTU< >< >
    UVQMF\ ^\ ^
    BUPNBUPNBUPN
    TUSJOHlBCDzlBCDz
    CJUTUSJOH
    DIBSMJTUbBCD`lBCDz
    Ϧςϥϧ
    14೥3݄13೔໦༵೔

    View full-size slide

  11. &MJYJS
    EFGNPEVMF)FMMPEP
    EFGIFMMP EP*0QVUT l)FMMP 8PSMEz

    FOE
    &SMBOH
    NPEVMF IFMMP

    FYQPSU

    XPSME
    JPGPSNBU l)FMMP 8PSMEz

    Ϟδϡʔϧఆٛ
    14೥3݄13೔໦༵೔

    View full-size slide

  12. NFUBQSPHSBNJOH
    14೥3݄13೔໦༵೔

    View full-size slide

  13. NPEVMF IFMMP

    FYQPSU

    XPSME

    JPGPSNBU )FMMP &SMBOH

    14೥3݄13೔໦༵೔

    View full-size slide

  14. EFGNPEVMF)FMMPEP
    EFGXPSMEEP
    *0QVUT)FMMP &SMBOH
    FOE
    FOE
    14೥3݄13೔໦༵೔

    View full-size slide

  15. EFGNPEVMF)FMMPEP
    *0QVUT)FMMP &MJYJS
    EFGXPSMEEP
    *0QVUT)FMMP &SMBOH
    FOE
    FOE
    14೥3݄13೔໦༵೔

    View full-size slide

  16. FMJYJSDIFMMPFY
    )FMMP &MJYJS
    FMJYJSF)FMMPXPSME
    )FMMP &SMBOH
    14೥3݄13೔໦༵೔

    View full-size slide

  17. &WFSZUIJOHJTBOFYQSFTTJPO
    14೥3݄13೔໦༵೔

    View full-size slide

  18. EFGNPEVMF4USJOH6OJDPEFEP

    DPEFT&OVNSFEVDF'JMFTUSFBN TQFDJBM@QBUI
    DPEFT GO MJOF BDD

    <DPEFQPJOU MPXFS UJUMF VQQFS @DPNNFOU>CJOBSZTQMJU MJOF <HMPCBM>

    LFZUP@CJOBSZ DPEFQPJOU

    MJTUTLFZTUPSF LFZ BDD \LFZ UP@CJOBSZ VQQFS
    UP@CJOBSZ MPXFS
    UP@CJOBSZ UJUMF
    ^

    FOE

    MD\DPEFQPJOU @VQQFS MPXFS @UJUMF^JOMJTUDPEFT MPXFSMPXFSDPEFQPJOUEP
    EFGQEP@EPXODBTF VORVPUF DPEFQPJOU
    SFTU
    EP
    VORVPUF CJOBSZCJO@UP@MJTU MPXFS

    EPXODBTF SFTU

    FOE
    FOE

    FOE
    &NCFEEFEEBUBCBTF
    14೥3݄13೔໦༵೔

    View full-size slide

  19. JFY
    EFGNPEVMF)FMMPEP

    EFGXPSMEEP

    *0QVUT)FMMP XPSME

    FOE

    FOE
    JFY
    )FMMPXPSME
    )FMMP XPSME
    %FpOFNPEVMFTPOTIFMM
    14೥3݄13೔໦༵೔

    View full-size slide

  20. NBDSPT
    14೥3݄13೔໦༵೔

    View full-size slide

  21. \OBNF NFUBEBUB BSHT^
    14೥3݄13೔໦༵೔

    View full-size slide

  22. JFYRVPUFEPNBY

    \NBY <> < >^
    14೥3݄13೔໦༵೔

    View full-size slide

  23. EFGNBDSPVOMFTT DPOEJUJPO PQUT
    EP
    RVPUFEP
    JGVORVPUF DPOEJUJPO
    VORVPUF PQUT

    FOE
    FOE
    VOMFTTBWBJMBCMF EP

    FOE
    JGBWBJMBCMF EP

    FOE
    14೥3݄13೔໦༵೔

    View full-size slide

  24. %PNBJO4QFDJpD-BOHVBHF
    14೥3݄13೔໦༵೔

    View full-size slide

  25. IBOEMF (&5 <VTFST *%> 3FR


    HFUVTFSTJEEP

    FOE
    14೥3݄13೔໦༵೔

    View full-size slide

  26. RVFSZGSPNVJO6TFS
    XIFSFVTDPSFPSVTDPSF
    TFMFDUV
    3FQPBMM RVFSZ

    14೥3݄13೔໦༵೔

    View full-size slide

  27. EFGNPEVMF4BNQMF5FTUEP
    VTF&Y6OJU$BTF
    UFTUFRVBMEP
    BTTFSUBCD
    FOE
    UFTUSFHFYNBUDIEP
    BTTFSUBCDddS
    FOE
    FOE
    14೥3݄13೔໦༵೔

    View full-size slide

  28. EFGNBDSPBTTFSU \ @ ^
    EP

    FOE
    EFGNBDSPBTTFSU \d @ ^
    EP

    FOE
    14೥3݄13೔໦༵೔

    View full-size slide


  29. UFTUSFHFY 4BNQMF5FTU

    &Y6OJU&YQFDUBUJPO&SSPS

    FYQFDUFEBCD
    UPNBUDI d
    dS
    BUUFTUFY

    UFTUFRVBM 4BNQMF5FTU

    &Y6OJU&YQFDUBUJPO&SSPS

    FYQFDUFEBCD
    UPCFFRVBMUP

    BUUFTUFY
    14೥3݄13೔໦༵೔

    View full-size slide

  30. lCFDBVTFZPVDBO
    FMJNJOBUFBOZUIJOHUIBUT
    UFEJPVTUISPVHINBDSPTz
    3JDI)JDLFZ
    14೥3݄13೔໦༵೔

    View full-size slide

  31. QSPUPDPMT
    14೥3݄13೔໦༵೔

    View full-size slide

  32. add get delete
    List
    Array
    Stack
    &YQSFTTJPO1SPCMFN
    14೥3݄13೔໦༵೔

    View full-size slide

  33. add get delete
    List
    Array
    Stack
    YourList
    &YQSFTTJPO1SPCMFN
    001
    14೥3݄13೔໦༵೔

    View full-size slide

  34. add get delete size
    List
    Array
    Stack
    &YQSFTTJPO1SPCMFN
    '1
    14೥3݄13೔໦༵೔

    View full-size slide

  35. NPEVMF KTPO

    FODPEF -JTU
    XIFOJT@MJTU -JTU


    FODPEF .BQ
    XIFOJT@NBQ .BQ


    FODPEF *OUFHFS
    XIFOJT@JOUFHFS *OUFHFS


    14೥3݄13೔໦༵೔

    View full-size slide

  36. EFGQSPUPDPM+40/EP
    EFGFODPEF UFSN

    FOE
    EFpNQM+40/ GPS-JTUEP
    EFGFODPEF MJTU

    FOE
    EFpNQM+40/ GPS.BQEP
    EFGFODPEF NBQ

    FOE
    EFpNQM+40/ GPS*OUFHFSEP
    EFGFODPEF JOUFHFS

    FOE
    14೥3݄13೔໦༵೔

    View full-size slide

  37. &OVNFSBCMF
    &OVNNBQ< > GO Y

    Y
    FOE
    &OVNNBQ GO Y

    Y
    FOE
    &OVNNBQ:PVS-JTU< > GO Y

    Y
    FOE
    14೥3݄13೔໦༵೔

    View full-size slide

  38. *OTQFDU
    EJDUGSPN@MJTU <\GPP ^>

    \EJDU
    \<> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <>^
    \\<> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <>^^^
    JFY
    )BTI%JDUOFX

    )BTI%JDU
    JFY
    %BUF5JNFOPX
    5
    14೥3݄13೔໦༵೔

    View full-size slide

  39. 0UIFSUPQJDT
    14೥3݄13೔໦༵೔

    View full-size slide

  40. TUBOEBSEMJCSBSZ
    ɾQSPUPDPMT
    ɾVOJDPEF
    ɾ[FSPCBTFEJOEFYJOH
    ɾNPSFVOJGPSN
    14೥3݄13೔໦༵೔

    View full-size slide

  41. JFY
    JFY
    U&OVN
    !UZQFU
    &OVNFSBCMFU

    !UZQFFMFNFOU
    BOZ

    !UZQFJOEFY
    OPO@OFH@JOUFHFS

    !UZQFEFGBVMU
    BOZ

    14೥3݄13೔໦༵೔

    View full-size slide

  42. JFY
    T&OVNNBQ
    !TQFDNBQ U
    FMFNFOU
    BOZ


    <>
    JFY
    14೥3݄13೔໦༵೔

    View full-size slide

  43. JFY
    I&OVNNBQ
    EFGNBQ DPMMFDUJPO GVO

    3FUVSOTBOFXDPMMFDUJPO XIFSFFBDIJUFNJTUIFSFTVMUPG
    JOWPLJOHGVOPOFBDI
    DPSSFTQPOEJOHJUFNPGDPMMFDUJPO
    'PSEJDUT UIFGVODUJPOFYQFDUTBLFZWBMVFUVQMF
    &YBNQMFT
    ᴺJFY&OVNNBQ < > GO Y
    YFOE

    ᴺ< >
    JFY
    14೥3݄13೔໦༵೔

    View full-size slide

  44. NJY
    ɾHFOBSBUFQSPKFDU
    ɾNBOBHFEFQFOEFODJFT
    ɾNBOBHFUBTLT
    ɾJOTQJSFECZ-FJOJOHFO
    14೥3݄13೔໦༵೔

    View full-size slide

  45. ·ͱΊ
    ɾ&SMBOH051͕͍͢͝
    ɾNFUBQSPHSBNNJOH
    ɾQSPUPDPMT
    14೥3݄13೔໦༵೔

    View full-size slide

  46. ͓͠·͍
    14೥3݄13೔໦༵೔

    View full-size slide