6 ms·
As someone who primarily makes a living from programming JavaScript, I don't think this is a good idea. Java may be a bit syntactically bloated, but it's a muc
by jnbiche 10y ago
As someone who primarily makes a living from programming JavaScript, I don't think this is a good idea. Java may be a bit syntactically bloated, but it's a much better engineered language than JavaScript. The parts "fit" together in a more methodical way. And while a learner may be able to get started with JavaScript quicker, as they move into larger projects they'll find the quirky JS implicit type coercion rules to create hidden and hard-to-debug errors.
And with Java's emphasis on interface vs implementation, it's an ideal language for learning data structures and algorithms. I'd say if you struggle with Java's syntax in your first year of CS, you might have a hard time making it as a professional programmer or academic computer scientist.
If they really wanted to move from static->dynamic, I'd agree that Python would be a much wiser choice, even though it too has its idiosyncrasies. As jacquem points out, Python has the added advantage of a rich data science/machine learning ecosystem.
Also, if they really wanted to use the web ecosystem, maybe TypeScript would be another wiser possibility than JavaScript?
Edit: IMHO, perhaps the best didactic language is SML, but that appears to be a losing battle these days.
- ghaff 10y agoMy impression is that Python does in fact tend to be the default choice for beginning programming/algorithms/etc. courses. It seems a reasonable choice. It does have some peculiarities but is definitely mainstream. And it is suitable, especially in conjunction with its ecosystem (as you say), for a lot of tasks. It seems more generally useful for STEM students and others who aren't necessarily going to major in CS.
- hackermailman 10y agoI've seen more university calendars these days copy CMU and add functional programming like SML as the new preferred intro course, esp European universities it really is probably one of the best student languages for understanding/reasoning about large programs by using types and it puts everybody on equal footing since normally most first year students have zero exposure to functional programming. https://existentialtype.wordpress.com/2011/03/21/the-dog-that-didnt-bark/ https://existentialtype.wordpress.com/2011/03/21/the-dog-tha...
- foobarchu 10y agoI agree. When I TA'd intro programming courses, I found that most frustration stemmed from a piece of code not doing exactly what you expect it to do. JavaScript is famous for having a million quirks and places where behavior changes based on context ('this', for example). That's going to lead to a million places where students blow up because it doesn't do what they expect it to do. Students need lots of little wins, and JavaScript is full of little losses.
- billf1953 10y agoThe article isn't wrong. I count 15 words that are CS specific jargon in the Hello World statement. Couple this with some big lecture and mediocre professor who explains poorly, it's pretty painful intro experience.