Comment Re:A huge pain (Score 1) 531
I'm not sure why anyone would want JavaScript anywhere else. I believe that the only reason why JavaScript is "popular" in the first place is because it is the only option available for client-side processing on the web.
You are discounting the ubiquity of both Flash and Java. I could easily imagine you not taking seriously other plugins like Shockwave, Unity, etc., but if your argument is based on what a given person will have installed on their machine by default, you've still got Flash and Java.
But what truly kills JavaScript for me is the lack of development tools and a solid reference. Debugging JS with an alert window is a horrible experience.
Douglas Crockford's Javascript: The Good Parts is an excellent reference. If you go to crockford.com, you can find links to videos of the class where he goes over the content in the book. Mr. Crockford also provides the JSLint tool on his website. It compensates for JS's lack of a compiler. Additionally, debugging with the alert window is an exercise in torture.
If you need to work with JS for a website, I would strongly recommend using the FireBug plugin. If you can't install plugins, then the very flexibility of JavaScript allows you to override the alert function. I generally add a div with the id="alert_box", then add this to your script: function alert(txt) { var box = document.getElementById('alert_box'); box.innerHTML = txt + "br/>" + box.innerHTML; }
That's not perfect, but it definitely works in a pinch. Just add an opening angle bracket before br. I couldn't get the formatting correct
Comment Re:Javascript is actually a great language (Score 1) 531
-Binding SpiderMonkey to openGL took me about a week and a half as a hobby project, and I'm not a particularly good C programmer. The result was an easy to use 3D livecoding environment that performed good enough for games. I had plenty of places in the JavaScript engine choice, binding and openGL calls to improve performance as well, but given the advent of webGL, I assumed that the proof of concept had outlived its purpose.
-If you prefer 2D, it is just as easy to bind it to libSDL. I didn't make much use of the graphics, but I used the basic sound functions to create a 256 channel additive sine synthesis soft instrument. Again, plenty of room to optimize (didn't even use sdl_mixer), and it meant that I was able to tweak the instrument code while it was running.