3 ms·
I think the same case can be made for JavaScript. With JavaScript, you are in a familiar environment (the browser) and get to do cool stuff immediately. The dis
by tikhonj 14y ago
I think the same case can be made for JavaScript. With JavaScript, you are in a familiar environment (the browser) and get to do cool stuff immediately. The distance between knowing no JavaScript and making something appreciable is very small, so you get up and running rather quickly.
I also found the JavaScript model--no classes, functions for scope and very lightweight objects very simple and easy to understand. JavaScript is a very small and mostly elegant language, which I think makes it simpler to pick up.
It has its warts, but so does almost any other language (don't get me started on Python). Besides, a lot of the warts (e.g. no new scope in loops or statements) are only issues if you already know a C-like language; ignoring syntax, scoping that way actually makes more sense. I think its simplicity and being in the browser more than make up for its faults, especially in a didactic role.
- ufo 14y agoI wander if that same train of thought would also apply to something like Lua. Its also a lightweight dynamic language, but it is less warty and even though it doesn't come installed everywhere it is very portable.
- tikhonj 14y agoWell I think Lua would be a better starting language than Python, but only on its merits as a language. My core point about Javascript is that it also comes very well integrated into a familiar environment (the browser) which makes it very easy to write beat programs not tied to a CLI. In my experience, that is much more difficult to do with a normal GUI toolkit, especially for a beginner but also very exciting. Making a neat GUI program, especially when starting out feels great and really motivates you to learn more. Or, at the very least, that was my experience when starting out.
- gailcarm 14y agoI sometimes worry about starting with such forgiving languages, but I suppose it really depends on the audience, and how well things are taught.