ElixirTalk / elixirtalk

ElixirTalk Podcast
https://soundcloud.com/elixirtalk
40 stars 2 forks source link

You broke my heart, Chris Bell #50

Open fozcodes opened 5 years ago

fozcodes commented 5 years ago

...the difference from going from Elixir to JavaScript is actually quite a big jump compared to going from like Ruby to JavaScript...

I'd like to preface this with a few things for context:

  1. I love Elixir.
  2. I love Chris and Desmond and this podcast as well as appreciate all the amazing work they do.
  3. I typically will answer "no" to "do you like JavaScript?"
  4. I come from a Ruby background and 3 years ago would have said all OOP all the time. But in the past 2-3 years have leaned very hard into the Functional Programming paradigm direction.
  5. Elixir School is the goddam bomb ❤️ . (not relevant but if you're reading this, please check it out)

Begin post...

WAT?!

I would argue that

I've worked on a lot of JavaScript projects in the last 3 years. When I started at my current company I was all OOP all the time. And, I was pretty anti-JavaScript. But I've come to not hate it. The reasons being, you can be both pragmatic and use libs like Ramda, Immutalbe, etc, to impose FP ideas on your otherwise jack-of-all-trades JS. (or if you really wanna get nuts: TS + https://gcanti.github.io/fp-ts/).

Once you approach JavaScript with that mindset and approach, things become both easier and more maintainable.

I agree with what Sophie said which was essentially: never stop learning. That's why I love Elixir, because of its pragmatism. It's like Elm. It's not the thing—it's a thing that gets you to one of the things like Functional Programming. What I mean is one of its promises is try to make FP approachable and accessible for everyone. Versus a Haskell or a Purescript—get people understanding the basic principles before diving into Index Monads or the like. And that can be accomplished with good JavaScript as well.

Case in point, one of my favourite (spelled correctly 🇨🇦 🇬🇧 ) things on the internet, written with Plain Ol' JavaScript examples: https://mostly-adequate.gitbooks.io/mostly-adequate-guide/

Desmond mentioned something in this episode which I totally agree with: I would teach [students] functional first. There's little surface area, it's clean, etc. It is also closer to what we understand in school as "math". What Elixir and and Dave Thomas' book really blew my mind with was the meaning of =. We grow up being taught the thing on the right must equal the thing on the left but we unlearn that as soon as we start assigning variables and then re-assigning variables. Which is why a puppy cries every time we use a let in JavaScript. Scientific Fact™.

Anyways, these are just my opinions, but I feel that all communities and the world would benefit from more FP ideas. Especially since JS is apparently "eating the world." I'd rather be eaten by an FP monster than an OOP one.

XO.

P.S - I'm not fully team Desmond - K8s might be the way forward for deploys. Sorry.

P.P.S. - I'm still thinking about my thoughts on The Inner Light. I've rewatched it many times and I'm still not convinced it's #1. I'm sorry. I've been waiting to speak about this face to face when we cross paths.