Slide 1

Slide 1 text

1 Friendly Elm 2016/11/04 Yosuke Torii

Slide 2

Slide 2 text

2 怖くない Elm 2016/11/04 Yosuke Torii

Slide 3

Slide 3 text

3 Who I am * Yosuke Torii * @jinjor * Works Applications Co., Ltd. * Contributor of Elm

Slide 4

Slide 4 text

4 Who I am * Yosuke Torii * @jinjor * Works Applications Co., Ltd. * Contributor of Elm

Slide 5

Slide 5 text

5 Introduction to Elm

Slide 6

Slide 6 text

6 Q. How many folks have heard of Elm? Q. How many folks have written any piece of code in Elm?

Slide 7

Slide 7 text

7 Q. How many folks have heard of Elm? 45 Q. How many folks have written any piece of code in Elm? 5

Slide 8

Slide 8 text

8 Elm is a FP Language * Generates JavaScript * Static Typing * Everything is Immutable * Fast rendering via Virtual DOM

Slide 9

Slide 9 text

9 Elm = Language + Framework VS No more JavaScript Fatigue!

Slide 10

Slide 10 text

10 How strong is Elm's type? Strong Haskell Elm Scala Java TypeScript JavaScript Ruby Python Flow

Slide 11

Slide 11 text

11 How strong is Elm's type? Strong Haskell Elm Scala Java TypeScript JavaScript Ruby Python Flow No Runtime Errors

Slide 12

Slide 12 text

12 Experiencing Elm in Practice

Slide 13

Slide 13 text

13 Making a seat arrangement app

Slide 14

Slide 14 text

14 Lots of complex UIs! * Copy / Cut / Paste * Undo / Redo * Selecting * Dragging * Zooming * Searching * Context Menu * Clipboard * Keyboard Shortcuts * Auto Saving * Co-editing

Slide 15

Slide 15 text

15 After several months... * Started using in our company (Still continuing development) * Open Source (WorksApplications/office-maker)

Slide 16

Slide 16 text

16 Stats

Slide 17

Slide 17 text

17 Stats 9,400 lines of Elm code

Slide 18

Slide 18 text

18 Stats 9,400 lines of Elm code 0 runtime errors

Slide 19

Slide 19 text

19 Refactoring with confidence * Regressions rarely happen * No fear with large/frequent changes * No untouchable code any more!

Slide 20

Slide 20 text

20 But... it looks difficult to learn

Slide 21

Slide 21 text

21 Elm is friendly for FP beginners ✓ FP for Front End developer ✗ Front End for FP programmer

Slide 22

Slide 22 text

22 No need to learn Haskell VS * Monad and other terminologies from Category theory * Type classes in general use The most difficult parts do not exist in Elm

Slide 23

Slide 23 text

23 Elm is getting even simpler 0.16 (2015/11) * More friendly compile error messages * Remove some record operations * Remove multi-way if 0.17 (2016/05) * Remove Signals (which was the most defficult) * Simplify main function 0.18 (2016/11) * More friendly compile error messages * Remove backticks * Remove [1..4] syntax * Remove primes in variable name

Slide 24

Slide 24 text

24 Elm is getting even simpler 0.16 (2015/11) * More friendly compile error messages * Remove some record operations * Remove multi-way if 0.17 (2016/05) * Remove Signals (which was the most defficult) * Simplify main function 0.18 (2016/11) * More friendly compile error messages * Remove backticks * Remove [1..4] syntax * Remove primes in variable name

Slide 25

Slide 25 text

25 Conclusion

Slide 26

Slide 26 text

26 Elm is reliable Elm is easy to approach

Slide 27

Slide 27 text

27 Thank you!