dwyl / learn-elm

:rainbow: discover the beautiful programming language that makes front-end web apps a joy to build and maintain!
https://github.com/dwyl/learn-elm
480 stars 41 forks source link

Why? #1

Open nelsonic opened 7 years ago

nelsonic commented 7 years ago

We are constantly on the lookout for a "(less but) better" way to build web applications.

elm-lang first came to our attention in 2014 when Seven More Languages in Seven Weeks: Languages That Are Shaping the Future showed how to build a game "without callbacks" ... Then last year when @gaearon mentioned it in his "Hot Reloading with Time Travel" talk we were reminded that elm was a source of inspiration for Redux ... When @rjmk mentioned it in https://github.com/dwyl/technology-stack/issues/12 we looked at it at the time with some excitement but decided it was not going to be suitable for our project(s) because it was front-end only ("Single Page App focused") and the "bundle" size for the compiled app was quite large and there was no support for server-side rendering (so we could not build apps progressively...).

Some people have reached "JavaScript Fatigue" (as exemplified in this post by @jjperezaguinaga https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f ... yes, the post is "satire" but it has roots in reality!) and are considering other options...

The question we want to answer with this investigation is: can we use elm-lang to build "Full Stack Progressive Web Apps" ?

Which Programming Language (Warning: Rabbit Hole)

nelsonic commented 7 years ago

Learning JavaScript 2008 - 2014: image (there used to be a lot less to learn before you could be ship! and people/teams shipped!)

JavaScript in 2016: ydkjs-bloated-js https://twitter.com/YDKJS/status/680073467299889152

Arguably people learning JS now have considerably more to learn due to the "convenience" of ES6 ( import, ->, ..., let, const, async, promise class, default, etc...) and the noise generated by "Classical" coders writing JS as if it were Java (class Container extends React.Component ... yeah, thanks Facebook, the "0ld" way sucked!) image

"They "trust me". Dumb fucks." https://en.wikiquote.org/wiki/Mark_Zuckerberg

Which is why we think focussing on using on the goodparts of JS is still a _good idea_ if you need to write JS code. But there really is no point trying to "convince" people (who have not been "burned" by bugs in production) not to use ES6 features which are a "Standard" ...

it's really much easier to encourage people who are already excited about learning Elm rather than keep trying to tell people to write less ES6/front-end-focussed code.

See: Toward vs. Away (Motivation) "Meta Pattern": https://youtu.be/qDfPPViyxXA

as @rtfeldman put it in his 6 Months of Elm in Production talk: https://youtu.be/R2FtMbb-nLs?t=47m36s

6-months-of-elm-comparison

nelsonic commented 7 years ago

At the time of writing, the entire Elm ("Official") Guide written by @evancz and improved by the elm community is (only) _111 pages_ (less than "JavaScript The Good Parts") and it has much better examples: https://guide.elm-lang.org/

The entire GitBook can be downloaded with a single click (e.g. for offline reading) by visiting: https://www.gitbook.com/book/evancz/an-introduction-to-elm/details and clicking on the download button: introduction-to-elm-download-as-pdf

snapshot: an-introduction-to-elm.pdf (though I recommend getting a "fresh" copy for latest changes!)

nelsonic commented 7 years ago

@rgoomar wrote a really good article titled: "Why I think Elm is the Future of Front End Development": https://medium.com/@rgoomar/why-i-think-elm-is-the-future-of-front-end-development-21e9b091fa05 Worth a read (and a "clap") 😉

nelsonic commented 5 years ago

I feel this issue deserves a comprehensive update for 2019. I plan to write an extended "essay" on Why I Still Pick Elm in 2019 similar to: https://github.com/dwyl/learn-elixir/issues/102 If you are interested in helping out in any way, please leave a comment with your thoughts. Thanks! ✨