View Full Version : classes, packages may be in future for JS

12-28-2010, 06:13 AM
take a look at the FutureReservedWords in ecma262 5th edition specification. interesting stuff.

too bad threads aren't a part of that. it's not part of the spec, but I need multithreading, but it might throw most web developers for a loop (thinking wise, and debugging nightmares) if they choose to use it. You would also need fancier browser properties and methods for synchronization and some sort of mutex, and either the ability to declare volatile variables or make them volatile by default.

multithreading comes in handy when you have multiple tasks to do at the same time that can be handled asynchronously, such as handling UI events for various windows or controls: you can do this in Java. I wish I could get it into the JS spec - the browser makers may balk.

Imagine a Dreamweaver (uses Gecko/JS) that can simultaneously handle your mouse clicks while you are doing a global search and replace... The idea is remote mind you, but the possibility is there.
or do a regex search and replace across the entire site's HTML files while modifying a CSS file. I have about 700 of them, and it takes me about 10-15 minutes where I go do nothing for a while.

12-28-2010, 03:47 PM
Part of HTML5 draft specs


Some examples (use latest browsers and be ready for a few crashes)


Read more