You chose a good example showing that JS is not perfect but I think every language has some quirks and needs time and energy to get familiar. Of course such strange behaviour demotivates beginners and yes JS can be hard but it's still a great language and there so many good parts you didn't mention. Besides, teaching a language is also very hard since the best way to learn a language is practise, practise, practise and having problems: sometimes when I am stuck with a problem for hours or even days, googling, asking on IRC, StackOverflow I gain so much knowledge I wouldn't get in a 2h class.
Re:Brython, Python in the browser
by mattmanser on Tuesday January 29, 2013 @11:12AM
(#5134711)
Accusing everyone who avoids javascript that they can't be bothered to learn it is pretty extreme.
I personally would choose any other modern language over javascript.
ANY.
I've learnt it and used it 8 or 9 years now, to me it just sucks. And still no-one knows how to write it well, no-one agrees how to structure it and every 2 years there is a whole new way to write javascript that comes out. I'm beginning to suspect it's because there is no good way to write it.
Indeed it does. Its one of the hardest modern language I have ever tried to teach someone. All the minor trip-wires (like http://stackoverflow.com/questions/1995113/strangest-languag...), but the worst part is that there are always at least 5 ways to do something.
Out of those 5, two is bad and should never be done but you would be lucky if any book mention this fact. Of the three left, only two is ever considered as good through noone can agree which one is the preferred way. One solution ends up being neither hated or praised enough to be worth mentioning in a book or ranting article.
So to figure out which ones to avoid, and which ones to use, one can either use what ever superstitious choice one learned by a previous teacher, or read massive amount of javascript articles and books to get a "feel" for it (no guarantee through). When you try to teach a student all the different methods, they will get information overload so one is simply forced to avoid large part of the language and hope they act like "don't think, just do what I say".
Python in the browser would just be a clear improvement over javascript.