Slashdot Mirror


ECMAScript 2016: New Version of JavaScript Language Released (softpedia.com)

An anonymous Slashdot reader writes: Ecma International, the organization in charge of managing the ECMAScript standard, has published the most recent version of the JavaScript language. ECMAScript 2016 (ES7 or JavaScript 7th Edition in the old naming scheme) comes with very few new features. The most important is that JavaScript developers will finally get a "raise to the power" operator, which was mysteriously left out of the standard for 20 years. The operator is **...
It will also become much easier to search for data in a JavaScript array with Array.prototype.includes(), but support for async functions (initially announced for ES2016), has been deferred until next year's release. "From now on, expect smaller changelogs from the ECMAScript team," reports Softpedia, "since this was the plan set out last year. Fewer breaking changes means more time to migrate code, instead of having to rewrite entire applications, as developers did when the mammoth ES6 release came out last year."

21 of 165 comments (clear)

  1. hated language becomes a success by sittingnut · · Score: 3, Interesting

    lots of knowledgeable people hate or dislike javascript, and have done so from the start, and give excellent reasons for their hate and dislike.

    but it has succeeded in spite of them and these reasons, and is more or less an indispensable part of modern on-line world currently.

    why? what did these 'knowledgeable' people missed or still miss when evaluating it?

    1. Re:hated language becomes a success by Anonymous Coward · · Score: 2, Insightful

      Alternatives to Javascript have been made, Python for one.

      Python (1991) existed before JavaScript (1995) and it does not run in the browser.

      Python is not an alternative to JavaScript.

    2. Re:hated language becomes a success by Shados · · Score: 3, Insightful

      Languages are not nearly as important as ecosystem. Else Haskell and co would be ruling the world of software engineering.

      We're only starting to see a world where good languages are starting to catch on...but it's slow going. If the ecosystem is there, it picks up, even if the language sucks.

    3. Re:hated language becomes a success by Z00L00K · · Score: 3, Insightful

      Strong typing and security wasn't the big problems for Java, and the lack thereof in JavaScript is one reason to avoid it if necessary.

      The problem with Java as a plug-in was that it had to load the JRE and download a kiloton of libraries before executing. A process that could take minutes and you as a user never knew if it was normal or if something had crashed.

      It was Flash that did this a lot better from a user perspective where the response was in seconds instead of minutes. But with security gaps worse than anything else.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    4. Re:hated language becomes a success by Tony+Isaac · · Score: 4, Insightful

      I think JavaScript is hated because programmers are taught in school these days to be purists. Object-oriented concepts are taught as THE way to write code, and strict type-safety is a religious commandment. There are very good reasons for good object-oriented and type-safe designs. But in the end, the goal is for the code to work.

      JavaScript is successful, I think, because of its simplicity. It is the BASIC of this generation. You can start using without having to install any tools. You can learn enough to do something useful in a few minutes, and you can actually DO something useful in one line of code. This means that lots of novices are writing lots of atrocious code out there, yes. But its low entry threshold allows many ordinary people to accomplish real work without having to study for weeks or years.

      Another reason JavaScript is successful is that it isn't "owned" by a single corporation. Remember VBScript? In many ways, in it's day, VBScript was a superior language to JavaScript. But it failed because it was a Microsoft product, and was never adopted by competing browsers. Same goes for SilverLight.

      The good news for the haters is this: WebAssembly is coming. This will make it possible for creative people to create their own, "better" languages, that will work in every browser without requiring users to install add-ins.

    5. Re:hated language becomes a success by UnknownSoldier · · Score: 4, Insightful

      > You don't understand the language

      Then why does my day job of writing WebGL apps for Smart TV's run at 60 fps then if "I don't understand the language" -- I guess these shaders just magically wrote themself ! And all those rendering optimizations just "magically" appeared in our code base !! Holy Shit !!! Ghosts are real -- shhh, don't tell the retarded Chinese Cult Politics party! (Yes, I know CCP doesn't official stand for that.)

      Don't assume. You look like an tool when you do.

      > Slashdot is full of incompetent developers like you,

      I know I shouldn't feed the Arrogant Cunt trolls, but since you you started with the ad hominem attacks, you're proof is _where_ again??

      But then again I wouldn't expect much from a coward too ashamed to hide behind an anonymous name. I guess you don't want the world to know stupid you really are.

      > Since when is a pragma a "shitty hack"?

      Are you really that fucking stupid? Wait, that was a rhetorical question -- we already know the answer to that.

      a) The FACT that this is enabled by default for ECMAScript's 6 modules should tell you that this was a HACK.

      b) Do you actually understand _anything_ about type safety and misspelling, at all?? Maybe if you had spent 30 years programming you would understand the importance of compile-time error detection and type safety? Gee, things that make our job of programming easier Go figure!

      c) Why do you keep making excuses for a shitty designed language?

      > My favorite is NaN != NaN.

      Straw man fallacy. Did I complain about isNan(x) ?? No, so quit changing topics because you've simply read What Every Computer Scientist Should Know About Floating-Point Arithmetic

      The bigger problem is the retarded "EVERY number is a double / float64" type crap.

      Gee, in ECMAScript 2 float and double are reserved word but not used. Oh wait, They are no longer in ECMA Script 5+. Make up your fucking mind !

      Never mind the fact that converting from a string to a var will OVERFLOW and NOT be EXACT.

      var s = '9223372036854775808', n = parseInt(s); console.log( n ); // 9223372036854776000 // *facepalm*

      Oh, look we have Number.isSafeInteger() but, gee thanks, for a mostly useless function as this _still_ doesn't solve the problem of needing an int64_t type.

      var s = '9223372036854775808', n = parseInt(s); console.log( Number.isSafeInteger( n ) );

      var n = (1 << 63); console.log( n ); // -2147483648; // *facepalm*

      I need an _exact_ native int64_t and uint64_t type -- WHEN will this be supported? Why do I have to use stupid hacks like "a | 0" to cast to an int??

      Javascript broken == operator is so fucked up it is laughable. WTF is the point of even having '==' when every smart programmer will use '===' instead???

      The four biggest reasons Javascript is a such as piece of shit:

      1. Automatic type conversions will get one in trouble:

      if( 0 == "0" ) console.log( "equal" ); // equal // WTF!?

      2. How about the inability to actually _include_ .js files like, you know, a concept that (almost) EVERY-other-programming language has???

      3. When Javascript does stupid shit like Automatic Semicolon Insertion (

  2. The power operator? Really? by MillionthMonkey · · Score: 4, Funny

    The power operator will get used once by one guy, who will use it in this code:

    export function pow(base, exponent) {return base**exponent;}

    To use it, enter this command:
    npm install js-power

    Then, in your code:
    const power = require('js-power');
    let eight = power.pow(2, 3);


    It's just that easy!

    1. Re:The power operator? Really? by MillionthMonkey · · Score: 2

      Whoops, that should have been const pow = import {pow} from 'js-power'; let eight = pow(2, 3);Thank God for unit tests...

    2. Re:The power operator? Really? by MichaelSmith · · Score: 2

      Thank God for unit tests

      Handy when static analysis is all but impossible.

  3. But JavaScript isn't a success. by Anonymous Coward · · Score: 4, Insightful

    The only way JavaScript can be considered a "success" is if you define "success" to mean "used because it's the only option available".

    But aside from that very limited view of "success", JavaScript is a total disaster.

    It's a very broken language. Its type system is a wreck. It didn't have real class OO for ages, and even its prototype approach is shitty compared to Self. Its standard library is rubbish. Its syntax is mediocre. It is full of utterly stupid shit like semicolon insertion. It's a failure when looked at solely as a programming language.

    Its surrounding ecosystem is also very broken. Numerous companies and organizations have had to pour huge amounts of money and other resources into it just to get JavaScript implementations that don't limp along at a snail's pace. It has also given us clusterfucks like Node.js and npm. Building anything more than an onclick handler using JavaScript rapidly becomes a huge debacle, and a maintenance headache.

    Its community is among the worst there is. Something has to be pretty wrong with a community that thinks a language as awful and broken as JavaScript is worth celebrating! But I will give the JavaScript community credit, it isn't as terrible as the Rust community is. At least the JavaScript community's biggest offense is only ignorance. They aren't hypocrites who attack others with their tyrannical Code of Conduct, like we see some other programming language communities do.

    JavaScript just isn't a success in any reasonable sense. It's a failure.

    1. Re:But JavaScript isn't a success. by Zontar+The+Mindless · · Score: 5, Insightful

      Prototypes kick ass, if you know how to use them.

      That is, if you're not one of the many who confuses the territory (objects) with just one of the maps (classes) you can make of that territory.

      The real beauty of JS is that the notation for just about any data structure maps very neatly on to any of the others. If it's easier to work with an object at some point as a hash, you treat it as a hash. A few lines later, it proves handy to treat it as an array. Later, maybe it's best to access it as an object again.

      Apparently, most folks can't handle that kind of freedom.

      --
      Il n'y a pas de Planet B.
    2. Re:But JavaScript isn't a success. by allo · · Score: 2

      It's consistent. Try to compare several truthy/falsy things to NaN, undefined, infinity and so on. You will notice, that the operators are not transitive, sometimes equivalence operators are not even symmetric or reflexive.

  4. Re: Why is it not ^? by AuMatar · · Score: 2

    It's bitwise xor, in pretty much every language.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  5. Re:Awesome! by Crashmarik · · Score: 2

    In a few more years we'll have this turd polished to a mirror sheen! Maybe some day enough of the horrible design flaws will be undone and make it almost halfway comparable to a serious language.

    Damn Straight

    000100 IDENTIFICATION DIVISION.
    000200 PROGRAM-ID. DAMNSTRAIGHT.
    000300
    000400*
    000500 ENVIRONMENT DIVISION.
    000600 CONFIGURATION SECTION.
    000700 SOURCE-COMPUTER. RM-COBOL.
    000800 OBJECT-COMPUTER. RM-COBOL.
    000900
    001000 DATA DIVISION.
    001100 FILE SECTION.
    001200
    100000 PROCEDURE DIVISION.
    100100
    100200 MAIN-LOGIC SECTION.
    100300 BEGIN.
    100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
    100500 DISPLAY "Damn Straight" LINE 15 POSITION 10.
    100600 STOP RUN.
    100700 MAIN-LOGIC-EXIT.
    100800 EXIT.

  6. Have you ever actually used Python?! by Anonymous Coward · · Score: 3, Informative

    The whitespace issue alone would make it a nightmare as a browser language.

    When somebody makes this "argument", it's a sure sign that they've never actually used Python, and that they're just spewing bullshit.

    Anyone who has used Python knows that this is totally a non issue. PEP 8 explains very clearly how to avoid and any all problems: "Use 4 spaces per indentation level."

    That's all you have to do! Like it says, use 4 spaces per indentation level. It's as simple as that.

    The poor record of backwards compatibility doesn't help, either.

    When somebody makes this "argument", it's also a sure sign that they've never actually used Python, and that they're just spewing bullshit.

    Python has remarkably good backwards compatibility. A number of Python 3 features were actually backported to Python 2. And Python 2 still sees excellent continued support. Python 2.7.11 was released only about 7 months ago, just two days before the latest Python 3 release, 3.5.1!

    Anyone who wants to keep using Python 2 can continue to do so. Those who want to use Python 3 are able to do so, too. And there's the excellent "2to3" tool which can quickly and reliably convert nearly all Python 2 code to Python 3 code. Hell, there are many Python libraries that support both Python 2 and 3 with ease!

    I'm sorry, son, but you clearly don't know what the fuck you're talking about.

    1. Re:Have you ever actually used Python?! by viperidaenz · · Score: 4, Insightful

      I think the implication is Javascript doesn't require any repetition of white-space as part of it's syntax.

      If you just wanted to do something very simple, you could embed Javascript in an HTML attribute value. You can't do that if you require line endings and white-space as part of the language syntax.

    2. Re:Have you ever actually used Python?! by MichaelSmith · · Score: 3, Insightful

      Minification is a nasty hack for languages without a binary format. Python compiles to .pyc

  7. Same reason it is bad - done in 10 days by raymorris · · Score: 5, Interesting

    JavaScript is has been the language all browsers support, but why? Also why is it so bad? The answer to both questions is the same:

    Because it was created in ten days. While Microsoft was scheduling meetings to discuss a proposal to plan a browser language, Brendan Eich created JavaScript (then called Mocha) and released it to the public. It was used because it was available, while other options were draft proposals, not yet approved for development, much less ready to use.

    When you spend all of two days designing a language and seven days implementing it, you end up with a pretty crappy language.

    The opposite end of the spectrum is Perl 6, which was designed from 2004 to roughly 2015. It's a rather nice language, for those who like Perl-like languages.

  8. ECMA by backslashdot · · Score: 2

    "ECMA"Script? I would love to adopt it, but I want my web site to be accessible from the UK.

  9. No competition (yet) by Tony+Isaac · · Score: 2

    One reason ECMA can be so slow to release new features, is that they have no competition. If you want to write Web-based applications, you're stuck with JavaScript. There are no other viable options. Why should they be in a hurry to change things?

    This is about to change. WebAssembly is coming. This is the development that will finally blow open the language barriers for browser-based programming. You'll be able to write client-side code in just about any language you already use and like, and you won't have to require the user to install some add-in to use it. Once this happens, it's quite possible that JavaScript will soon go the way of BASIC and COBOL.