Slashdot Mirror


Web 2.0, Meet JavaScript 2.0

Jeremy Martin writes "Well I suppose it's an undeniable fact about us programmer-types — every now and then we just can't help but get excited about something really nerdy. For me right now, that is definitely JavaScript 2.0. I was just taking a look at the proposed specifications and I am really, truly excited about what we have coming."

4 of 248 comments (clear)

  1. Re:Sounds awesome, by cheater512 · · Score: 4, Informative

    Use the error console in Firefox/Seamonkey. Very specific errors.
    Seamonkey even has a javascript debugger.

    If your using IE, well then *snigger* your screwed. ;)

  2. Re:Cross-Browser by stephanruby · · Score: 4, Informative

    These new features are nice and all, but what I really want as a Web developer is for a Javascript standard thorough and widespread enough that I can write scripts that work on most browsers without a bunch of hacks to make sure that each browser gets the right code. Anyone have a prognosis on this?
    You mean this? An (almost) universal metalanguage that generates the right Javascript/Actionscript/Neko scripts for different environments.
  3. Re:"Program Units" - potential for misuse by Bogtha · · Score: 3, Informative

    No, really, there's no new security problem here. Different hosts? How is that different to <script> elements pointing to different hosts today? Compromised hosts? What's different to today?

    Browsers have been able to download code from disparate, potentially untrustworthy remote hosts since they first started executing JavaScript. You have not discovered a new problem.

    I was just hoping someone more knowledgeable on the subject would provide some thoughts on the issues.

    Somebody already did, but you didn't like the answer.

    --
    Bogtha Bogtha Bogtha
  4. Re:Here's the link to the real info. by imbaczek · · Score: 3, Informative

    At least they didn't add templates. They did, sort of.

    Parameterized types
    A parameterized type is a template for new types and is defined by adding type parameters to class, interface, type, and function definitions:

    class Pair.<T> {
    var first: T, second: T
    }
    type Box.<T> = { value: T }
    function f.<T>( x:T ): T ...
    A parameterized type is instantiated by supplying concrete types for its parameters:

    new Pair.<int>(3, 4)
    f.<int>(37)
    var v: Box.<boolean> = new Box.<boolean>(true)
    The predefined types Map, Vector, IteratorType, and ControlInspector (among others) are parameterized.
    The parameterized types in ES4 do not allow for type parameter constraints or variance annotations. However, nothing precludes the inclusion of these in a future edition of the language.