5 ms·
JS is a really horrible language to learn from the perspective of a teacher. So many concepts dumped on you all at once. Before you even know what a function i
by yomly 6y ago
JS is a really horrible language to learn from the perspective of a teacher.
So many concepts dumped on you all at once. Before you even know what a function is, you have the entire DOM API dumped on you and is available in the global scope.
If you try to learn OOP in it, you have the choice of trying to grapple with the leaky ES6 class keyword or you get prototypal inheritance and `this` will come up.
That said, from a learner's perspective it's great: you have the entire DOM available to you instead of having to learn how to take the car of the cdr of a list and wondering how that has anything to do with building the next Airbnb/Uber of this world...
At least with Python/Ruby they commit hard to terseness / fluent interfaces so you have less syntactic noise to deal with, and Haskell commits hard on equational reasoning so you can pick up computation if you've come from a mathsy background. Or Scheme which is as close as you can get to "no syntax" as you can (IMO)
- tiborsaas 6y agoI used to teach programming with JS. It was not really a blocker for me at any level. When we hit some quirks I stopped to explain why this is and how it's different in other languages. Maybe because I like JS made me enjoy teaching it as well :)
- yomly 6y agoI actually quite like JS, but I almost feel bad for people who discover it as their first foray into programming. I mean it's great because it makes programming more accessible to non devs. But man is it unfortunate that JS was the language that ended up being the language of the web. The browser is the ultimate interactive development environment. You can literally play with the page in situ. Akin to CAD and Excel (...or Emacs[0]) [0]https://www.gnu.org/gnu/rms-lisp.html https://www.gnu.org/gnu/rms-lisp.html
- tiborsaas 6y agoDon't feel bad, my first language I've ever written programs in was C-64 basic :) I don't know what would have been a better choice, but JS is not bad for a browser language. It had a rough childhood, but turned out to be a decent adult. I still remember VB Script supported in old IE, but then there was JS and I just focused on that. It really made no difference to me since I was able to build cool stuff I wanted to. That brought me joy of creation and that's what mattered, not "that's not OOP like god set in stone". Whatever enables people to be more involved in programming, I consider it as a good thing.