by ralusek · 8y ago · 0 comments
Want to work with data from any API? Well JSON, industry standard data protocol, happens to already use exactly the syntax you're familiar with!
Want to give them a sandbox to mess around in...take your pick between jsfiddle, plnkr, codesandbox, etc. Many of these let you collaborate realtime with people to help them work through problems directly. Most people learning to program have 0 familiarity with using a terminal, and having to go through the process of getting an environment set up correctly ALONE is enough to turn off the vast majority of people to programming.
As the author already mentioned, rendering a UI in JS is going to happen on the most ubiquitous platform on the planet: the web browser. If a programmer starting today goes into UI work, the odds are that they'll be building UIs for a web browser is astronomically high, the odds that they'll be using a one-off python toy library is highly unlikely.
And last but not least, the syntax of JavaScript is very much like the syntax for Java and C. Learning JavaScript first makes it very easy to read code from other mainstream languages and have a good idea of what's going on. Particularly with ES6, there is very little to complain about in the syntax of JavaScript.
Sure, JS is the hip language for making SPAs, but not the best way to show what boolean logic is and the difference between for and while loops.
It's really no worse for that than any commonly used language. Perhaps you meant something else?
And I see data structures and algorithms mentioned below...I'm not exactly sure which data structure or algorithm it is that you suspect cannot be expressed in JavaScript?
And anyone who seriously considers teaching a first language that students can't use in a data structures and algorithms course (without having to learn a second language) isn't worth paying much attention to.
Why? Both colleges I've been to had their DSA courses after at least two intro courses, and in a different language than the intro courses.
What is so inherently contemptible about this?
C is weakly typed and has implicit conversion. JS is weakly typed and has implicit conversion.
You most certainly mean static types, but even there we have issues with C because passing void pointers is a thing for generic ADTs. This is even weaker typing than JS offers (and that's without talking about the interactions with function pointers).
An even stronger argument against your position on static types is SICP. It's written in scheme, but I have yet to find an introductory book more packed with CS fundamentals. You can read it multiple times and learn new things (very rare for a book to speak to both the experienced and the novice).
If static types were really important, Java, all the C's, and most common be CS language would never be used and Standard ML would reign supreme (perhaps it should anyway).
Types are simply one weapon in the war between elitism and pragmatism.
What more concurrency are you looking for?
You are restricted to what ammounts to coroutining, which is just one of the many concurrency techniques out there, none of which you can teach with javascript.
You wouldn't be able to show many of the other possibilities of concurrent programming.
Parallelism I see as a hardware feature that can make programs faster.
I thought about the "callback hell", this is a bit more like coroutines, a quite limited form of concurrency (like non-preemptive threads). In this sense Js is very limited in what programming techniques can be taught.