3 ms·
I would disagree in this case. The mere fact that a JS engine is present in any browser alone makes it compelling for those that have never programmed before. T
by dpearson 15y ago
I would disagree in this case. The mere fact that a JS engine is present in any browser alone makes it compelling for those that have never programmed before. There really is no setup, and the OS becomes (to a degree) irrelevant. Further, javascript is an easy language to prototype in, and, at the basic level, easy enough to teach and write.
- untog 15y agoI think you're both coming from different directions, here. For Computer Science, it's a bad choice. For Computer Doing, it's a good choice. Not passing judgement either way, but I doubt you're ever going to agree with each other on this basis...
- judofyr 15y ago> There really is no setup Except for creating an HTML-file and understanding how all that works. > and the OS becomes (to a degree) irrelevant. This is pretty much true for any language as long as you don't use platform-specific features (fork). > Further, javascript is an easy language to prototype in, and, at the basic level, easy enough to teach and write. "Easy language to prototype in"? Both Python and Ruby are equally "easy", but comes with even more batteries included. They also have a consistent object model, as opposed to JavaScript's prototype-inheritance-is-cool-but-let's-mix-in-constructors-from-classical-OOP. There's pretty much nothing like JavaScript's prototypes in any other languages (Self/Io works quite differently), and I don't really see any gain in teaching that to students early on.
- dpearson 15y agoMy comparison on setup was mostly in comparison to the effort in setting up a toolchain or an interpreter, in a situation like this where you have to support users on different OSes/hardware without spending valuable teaching time on it. I do have to agree with you about the ugly mix of inheritance models, but for the initial teaching phase, you could largely ignore that before moving on to a different language to teach either true OOP or functional programming.
- benihana 15y ago>Except for creating an HTML-file and understanding how all that works. Using chrome? Hit [ctrl+shift+j|cmd+option+j] and you can write JavaScript without any HTML necessary. Other browsers have similar consoles that need no HTML to write JavaScript.
- judofyr 15y agoRight. Let's teach programming in an environment that we never use to create full projects. REPLs are fine to experiment with, but it's important to learn how you would write "real" code. Dumbing down this essential concept is just silly.
- simonw 15y agoCompletely disagree - I write most of my production code in a REPL (either JavaScript or Python), and only save it to a file once I know it's going to work.
- judofyr 15y agoI'm not against using REPL, but it's not viable to solely write in REPLs, therefore we need to teach "how to run things in files" and then we're back at crappy HTML-files.
- syaz1 15y agoI don't see anybody saying one need to use REPLs only. What's nice with JS is you have the option to open browser's JS console and try stuff there. You don't need to. But you can. All modern browsers has JS console. That's dev environment setup freely for you. And if you use FF, enhancing that env with Firebug is just a few clicks away. WIth the rise of web apps nowadays, this is actually a very good move.