Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming Mozilla The Internet IT

Brendan Eich Explains ECMAScript 3.1 To Developers 94

VonGuard writes "On April 9, ECMA International produced the final draft for the first major update to JavaScript since 1999. It's called ECMAScript 3.1, but will soon be known as ECMAScript, Fifth Edition. You'll know it as JavaScript, the Next Generation. Mozilla will begin implementing these features after Firefox 3.5, and Microsoft is already showing prototypes behind closed doors. The question, however, is what this will change for JavaScript coders. To get those answers, I tracked down Brendan Eich, Mozilla's CTO and the creator of JavaScript. I transcribed the interview without any editorial since he explains, perfectly, what's changing for programmers. Long story short: Json will be safer, getters and setters will be standard, and strict mode will make things easier to debug."
This discussion has been archived. No new comments can be posted.

Brendan Eich Explains ECMAScript 3.1 To Developers

Comments Filter:
  • by riyley ( 1122121 ) on Friday April 17, 2009 @09:13AM (#27610933)
    FTA: A lot of JavaScript is forked. If the DOM is IE, use this version of the code, otherwise use this.

    Until this changes throughout the entire web, ECMAScript will only be that other part of css. It's just too problematic to have to code separate DOM funtionality for every browser on the market.
  • Re:OOP? (Score:5, Informative)

    by bishiraver ( 707931 ) on Friday April 17, 2009 @09:48AM (#27611535) Homepage

    ECMAScript is a prototypal functional programming language. You don't just set members of an object by defining its prototype in an object literal.

    You can also, by the power of closures, have private functions, private variables, and protected functions. (ECMAScript is interesting in that public member functions cannot access private variables, but protected functions can. Downside is that protected functions (defining them as this.foo = function() {}; in the constructor) are created new for each instance of the object, unlike the prototype (public) members.

    While ECMAScript isn't built to enhance tail recursion, it's actually possible. For example, a continuous passing style fibonacci sequence calculator [warfangled.com].

    Not quite as readable as haskell or lisp, but still - proves that JavaScript is a true functional programming language.

  • by Hurricane78 ( 562437 ) <deleted&slashdot,org> on Friday April 17, 2009 @10:33AM (#27612575)

    Yeah right. It's just that I did exactly that from 2001-2006.
    You write some intermediate standard layer, and you're done with it.
    Maybe you just don't know how to abstract things away. ^^

    JavaScript is surprisingly powerful. And you can even fix the whole missing/buggy DOM functionality in IE, by adding functions to the prototypes of the DOM objects.
    For CSS fixes, there is even a library.

  • confusing names (Score:3, Informative)

    by bcrowell ( 177657 ) on Friday April 17, 2009 @11:16AM (#27613569) Homepage

    The names and version numbers are really confusing. The following is my understanding, which may be wrong -- if so, please correct me.

    ecmascript 4==javascript 2==actionscript 3 ... If I'm understanding correctly, this was overambitious, turned out to be a dead end, won't happen.

    ecmascript 3.1==ECMAScript, Fifth Edition ... This seems to be the more modest thing that they backed off and got a consensus for instead.

  • Re:What's the catch? (Score:3, Informative)

    by shutdown -p now ( 807394 ) on Friday April 17, 2009 @01:22PM (#27616427) Journal

    Not really. In "EEE", "extend" implies that the company unilaterally extends the standard that they've previously implemented ("embraced") with new features - for example, what MS did with Java in J++ in the past. In TFA, "cooperating" meaning "working as a part of language committee" - and that committee consists of many other companies, including direct MS competitors. There's no hidden catch here - MS is participating in proper discussion process, not overriding it.

    In a similar vein, Microsoft "cooperates to improve" ISO C++, by having a number of people on the corresponding ISO committee (e.g. Herb Sutter). The same goes for HTML5, WS-* stack, XQuery, and many other standards that are implemented in whole or part in MS products.

"What man has done, man can aspire to do." -- Jerry Pournelle, about space flight

Working...