JavaScript is fundamentally single threaded, no parallel threads in sight. Asynchronous programming is necessary for any task that might block; JavaScript programming usually involves creating and passing around a lot of callbacks, essentially forcing the developer to manually translate sequential code into continuation passing style.
One solution was introduced at the Emerging Languages Camp at OSCON 2010: StratifiedJS. The language is essentially JavaScript with a few more keywords and concurrency constructs which permit the developer to write sequential code. Yet it all still runs on normal JavaScript engines that come in todays browsers.
How's that possible? InfoQ talked to Alexander Fritze, CTO of Onilabs, to find out. Onilabs is behind Apollo, a free and MIT licensed, browser based implementation of StratifiedJS.
0 comments:
Post a Comment