The Great JavaScript Debate: Improve It Or Kill It
snydeq writes "Recent announcements from Google and Intel appear to have JavaScript headed toward a crossroads, as Google seeks to replace the lingua franca of the client-side Web with Dart and Intel looks to extend it with River Trail. What seems clear, however, is that as 'developers continue to ask more and more of JavaScript, its limitations are thrown into sharp relief,' raising the question, 'Will the Web development community continue to work to make JavaScript a first-class development platform, despite its failings? Or will it take the "nuclear option" and abandon it for greener pastures? The answer seems to be a little of both.'"
In my opinion... kill it! Kill it with fire!
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
Leave the web for documents. Run applications natively. Why is this so hard?
Give me Classic Slashdot or give me death!
If someone wants to add to its mission, or write a client-side language with a different mission, go for it.
But a lot of the web is running nicely with JavaScript, and pulling out the JavaScript rug from web developers and website owners is really not an option.
Let's call for some pragmatism here, shall we?
Steve Magruder, Metro Foodist
Now we can all switch to using Javascri... oh. Crap.
This signature can save you $400 on your car insurance!
I like Javascript, it allowed me to code without having to install big fancy development platform. Given how widespread it has become, I fail to see how killing it make any sense. I don't care about dogma, I care about reality.
JavaScript was meant to manipulate documents, and is used to make those documents into applications.
Lets just throw out HTML altogether and come up with a new language to make the client side section of web apps with. HTML was never envisioned to do this.
You shut your mouth! You shut your GODDAMNED MOUTH!
I know I'm going to get banned from /. for all time, but can we talk about something like Silverlight please? It's a dream to program for and it does all the stuff that we wish javascript did. Ok, begin anti-M$ rhetoric.......now
I decided it would be a neat hack to flood my living room and turn it into an indoor pool. Boy, did that reveal some serious shortcomings in my home's electrical system. Can any recommend an electrician who doesn't suck as bad as the guy who installed the one I have now?
People keep figuring out how to do even more with JavaScript, forgetting that just because you can, doesn't mean you should.
I used to hate javascript. I'd disable it in my browsers up until a few years ago and avoid it like the plague in all of my web development tasks. A year and a half ago I became a full time web developer.
I had to shut up and learn to love javascript, and I really do. There's nothing wrong with it.
A language like PHP3 lacks enough features to make many common patterns possible. Progressing to PHP4, and PHP5, more and more patterns became possible. PHP can now house proper code, though it frequently doesn't because people still hack away like it's PHP3 or PHP4
To me, javascript feels much the same way. I never come across a pattern I can not implement, though I see a lot of coding that ignores standard patterns to it's own demise. linq.js, underscore.js, jquery, and some in-house libraries make classes, objects, collections, DOM work, etc, amazingly simple. The standard library is very poor, but that's ok because the 3rd party libraries are fantastic. Outside of IE8 and under, the speed is FAST too.
A lot of times there's a function that will be implemented by a library but can optionally wrap to a native function if available, making support for everything universal.
HTML5 has worker threads. Javascript does have prototype inheritance.
Do you even lift?
These aren't the 'roids you're looking for.
I wouldn't mind if they added Lua to web browsers.
Give us a static strongly typed alternative/extension without the literally hundreds of known design flaws.
How about a Javascript that's more Java-like?
I think many people are missing the point of Javascript.
The new spec includes the ability for Javascript to open sockets. Once that takes hold, you'll have the ability to completely control the browser window from the home server.
When that happens, it will be big. The browser is essentially a rendering machine which makes it trivially easy to show things and is largely machine independent. Instead of selling a huge monolithic program, companies can simply sell time on their servers to run their programs.
Imagine that you want to use a big engineering program - Orcad or Altium Designer, for example.
Instead of paying $10,000 for a copy of the program and taking a chance that it's as good as it's marketing claims, you can buy a month of usage for $100, and the executable will run on the company's servers while using your browser to paint the screens. Sort of like how World of Warcraft runs on servers, but paints the screens locally.
This has many advantages for the user:
1) You don't have to risk an enormous sum of money to try something out
2) You don't pay for the product more than you need it
3) You have NO installation issues
4) You are always using the most up-to-date version
5) The vendor can keep backups of your files for you
6) You can access your files and the application from anywhere on the net
And for the vendor:
1) The code is never given out (only runs on the server): no piracy!
2) You don't need multiple versions for different architectures (reduced engineering)
3) You don't have to push updates to the users all the time
4) You can tune the compilation/installation to make the best use of the server
5) Rendering is much easier - the bulk of the code is written for you by others (reduced engineering)
There are some disadvantages - the vendor has access to the document, which means that they can also sell the document to spammers (designs to China, for example). This can be dealt with by using a trust model; ie - the company will have an online reputation which will get quickly tarnished once this happens.
That's the promise of Javascript, and the real potential of the cloud. Companies supplying online services to compete for customers.
I doubt very much a language syntactically and stylistically optimized for light-duty GUI event scripting can be a good language for implementing OS-like features and vice-verse. Leave JS alone and create a new language that's a better fit for "deep guts" programming.
What's next, ADA-Script?
Table-ized A.I.
The history of the Internet and examples like IPv6, HTTP, SMTP, etc have shown us over and over that "good enough" + evolution trumps replace almost every time.
The path forward is clear: improve JavaScript, extend it, improve HTML, and keep on trucking. Neither will ever be replaced on a wide scale, only evolved.
The reason we don't already have worldwide IPv6 deployment is they redesigned IP instead of just extending the addresses.
Natural != (nontoxic || beneficial)
I can't support this idea enough. Lua would be just about the best possible thing that could happen to the web.
Wrong on three counts (should I say two and a half?). Not bad.
Support for threads is coming (already there in some browsers).
There is block level scope since JavaScript 1.7
There is inheritance, since day one.
No strong typing, granted.
Write boring code, not shiny code!
You really need to read Crockford's "Javascript: the good parts". You absolutely do make private methods and vars (ever noticed that you can't directly call jQuery's internal methods? Or TinyMCE's? Or any other major library/framework?)
He also makes the case that actually JS has more patterns to allow code re-use. That's why things like Mootools can even fake things that look like classical class inheritance patterns for you, if you really want to do that.
Check out http://www.crockford.com/javascript/inheritance.html and http://javascript.crockford.com/prototypal.html and http://www.slideshare.net/douglascrockford/javascript-the-good-parts-3292746
Earth?
Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/