I heart ECMAScript (poll)
I’ve coded in C, C++, Delphi, Basic, VB, VB.NET, Java, Perl, PHP, ColdFusion, Pascal, 68k assembler, and probably a few other languages that I can’t remember right now. And yet, my absolute favorite has to be the many-headed beast that is JavaScript, ActionScript, and ECMAScript.
- Fewer syntactic hurdles
- Lots and lots of literals
z = {'foo':3.14, "truefalse": [true,0]} - Functions are first-class objects
- Anonymous objects and functions are wicked easy
doSomething(123, function(a) { return a + 1; }) - Version 4 allows for typing hints
name: String = "Rick" - There’s a ternary operator (don’t scoff until you’ve had to use a language without one)
i = (j == 3) ? 'a' : 'b' - Literals are objects
s = '0000'.substr(0,4-t.length) + t
Admittedly, that last example is nasty-ugly, but I like it. What say you, thunderbolt?
About this entry
You’re currently reading “I heart ECMAScript (poll),” an entry on No, I am better than that!
- Published:
- Thursday, February 22nd, 2007 at 14:55 EST
- Author:
- Rick Osborne
- Category:
- ColdFusion, Poll, Programming, Web
Comments are closed
Comments are currently closed on this entry.