News for hackers. Stuff that matters.
Re:Retiring Python as a Teaching Language by charlysl on Sunday January 07, 2018 @12:26AM (#16089390)
Js quite limited for teaching, no concurrency for instance
Re:Retiring Python as a Teaching Language by iovrthoughtthis on Sunday January 07, 2018 @02:31AM (#16089767)
setTimeout and non-blocking io produce out of order execution.

What more concurrency are you looking for?

Re:Retiring Python as a Teaching Language by charlysl on Sunday January 07, 2018 @06:55AM (#16090504)
You have a point, I shouldn't have said "no concurrency".

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.

Re:Retiring Python as a Teaching Language by iovrthoughtthis on Sunday January 07, 2018 @08:27AM (#16090777)
I agree, JS is absolutely limited for teaching concurrency.
Re:Retiring Python as a Teaching Language by catnaroek on Sunday January 07, 2018 @12:43AM (#16089454)
I'm guessing you mean “no parallelism”, right? Because JavaScript has (admittedly horrible) concurrency support. Otherwise what's this “callback hell” some people complain about?
Re:Retiring Python as a Teaching Language by charlysl on Sunday January 07, 2018 @12:59AM (#16089505)
By concurrency I mean expressing in the language that a computation or operation is independent, for instance by putting it in a thread or making it lazy, and all the programming techniques that this enables: active objects, order finding (which plays very well with paralellism btw), etc.

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.

Re:Retiring Python as a Teaching Language by falafel on Sunday January 07, 2018 @12:48AM (#16089470)
Callback hell? What is this 2010? Callback hell is a non-issue in modern JS code with promises, and async/await.
Re:Retiring Python as a Teaching Language by catnaroek on Sunday January 07, 2018 @02:35AM (#16089778)
Promises don't eliminate callback hell any more than objects eliminate their underlying data structures.