by Kilimanjaro · 16y ago · 0 comments
- Get data from SQL backends, easy.
- Templates, easy.
- MVC, easy.
- Curl, Ajax, easy.
- JSON, XML, easy.
- Files, sockets, easy.
You name it, I assure you it is easier than any other language you've used before.I say, it is just a matter of ONE year to finally mature the most interesting projects out there, Node.JS and V8CGI
If you want to get your feet wet, go grab V8CGI and play with it, really easy. If you need to play with the geekiest stuff, get Node.JS then.
I guarantee you, you'll never look back. But please, give it a try before judging it.
http://code.google.com/p/v8cgi/
I don't recommend rhino, ringo, or narwhal, just because I don't like to run on top of java. You may try spidermonkey or flusspferd if you like C++ more.
Whatever your flavor, give it a try, then come back and share your experiences.
Yes, I am a JS advocate.
- Global variables by default, which means you will have "var" sprinkled everywhere.
- Brain-dead binding.
function Constructor() {
this.foo = 'bar';
var that = this;
window.setTimeout(function() {
alert(that.foo);
}, 1);
}
- You can call a function with less arguments than specified, meaning you potentially have to make sure each argument is not "undefined" .- Somehow JS isn't weakly typed when it comes to switch statements.
a = 5;
b = '5';
if( a == b )
alert("Equal");
switch (a) {
case b:
alert("This never shows");
}
I am fairly certain that JS popularity is mostly in part due to its monopoly on the web. I'm sure there are more experienced JS users who can point out more flaws.So no, I've never encountered such problems.
Nowhere did I complain about needing to declare things before using it. Having variables be global by default is really poor design.
And about silly equalities, it will inevitably happen once your programs get bigger, and you become frustrated with a bug that has been suppressed through multiple function calls because Brendon Eich thought weak typing was a good idea.