Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming The Internet Upgrades

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

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."
This discussion has been archived. No new comments can be posted.

ECMAScript 2016: New Version of JavaScript Language Released

Comments Filter:
  • by sittingnut ( 88521 ) <sittingnut.gmail@com> on Saturday June 25, 2016 @08:47PM (#52390839) Homepage

    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?

    • by Anonymous Coward on Saturday June 25, 2016 @09:10PM (#52390879)

      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.

      • by Anonymous Coward

        > It didn't have real class OO for ages, and even its prototype approach is shitty compared to Self.

        This is actually a favor JavaScript did us: it showed that classes are unnecessary for OO. I enjoy prototype-based programming, and while I haven't tried Self, I don't see anything wrong with JavaScript's approach.

        • 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.

          • I think the actual benefit of similar languages is that they don't force you into any hard-coded implementation of semantics, like C++ does. Lots of programming problems can be expressed in terms of some dynamically/programmaticaly defined behavior, and the mechanisms exposed by JS and similar languages allow you to get rid of a lot of programmaticaly derivable boilerplate (Qt people, e.g., had to write a source code preprocessor instead).
          • ...if you know how to use them.

            To me, that means the same thing as, "I'll just be careful."

      • by Anonymous Coward

        the lack of OO is one of the things that makes ECMAscript good.

        You are behind the times if you still think javascript is bad. Its far better tham most languages out there.

    • by Anonymous Coward

      Alternatives to Javascript have been made, Python for one.

      Why it doesn't catch on, I will blame Microsoft and Linux browser developers. Microsoft because it doesn't ship with any interpreted languages, and Linux software developers because they ignored the Unix philosophy, the JavaScript interpreter shouldn't be part of the browser, it should be stand alone and the html/css rendering engine should have an API/ABI which can be accessed by a variety of languages, and these languages should be independent from

      • Re: (Score:2, Insightful)

        by Anonymous Coward

        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.

        • by Z00L00K ( 682162 )

          And Microsoft tried to push vbscript in the browser, but that's even worse than JavaScript.

          I'm not sure why anyone would use JavaScript anywhere else but in a browser. And even there it's not really a good language.

      • Re: (Score:2, Insightful)

        by Dahamma ( 304068 )

        Yikes, Python is NOT an alternative to Javascript in any reasonable way. The whitespace issue alone would make it a nightmare as a browser language. The poor record of backwards compatibility doesn't help, either.

        The crazy thing is, a reasonable alternative to Javascript that would be trivial for JS programmers to learn already exists: TYPESCRIPT. It's even supported by Node.js and a lot of (smart) developers are using it in that case to get reasonable type safety and decent class/interface/module suppo

        • by Anonymous Coward

          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 [python.org] 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 compati

          • by guruevi ( 827432 )

            First of all, we're not talking about Python 3 (or 4 or 5), we're talking about Python 1.2 & 2.0 when ECMAScript and VBScript fought it out.

            When every byte counts (remember, 56k modems), how do you minify the spaces? Python has a lot more issues than just it's spacing though. Unicode support wasn't there (not sure if it's still defaulting to ASCII strings) while JavaScript defaults to UTF-16. Besides that, the learning curve for Python is a bit higher than JS, type coercion is available in Python 2 but

            • by Dahamma ( 304068 )

              That is just the language issues, there are/were political issues as well with Guido, I remember being a bit of a pain to work with when it came to controversial features and 'reworking' the languages caused Python 1-2-3 to be practically different languages. JavaScript from the early era still works just as well in current browsers as modern JavaScript and doesn't need individual interpreters.

              Good point. The default browser scripting language is not going to work out well with a language whose creator basks in his designation of "Benevolent Disctoros For Life" (BDFL).

            • by allo ( 1728082 )

              Bullshit. At this times nobody cared to minify js. This insanity started much later, when people noticed their sites are loading slowly (because of ads, but we cannot remove the ads, so lets save 200 byte in the javascript file, which is cached anyway). At this time you could read html/javascript source code like a book, nothing was obscured.

          • Re: (Score:1, Flamebait)

            by Dahamma ( 304068 )

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

            I am 100% sure I have done more with Python in the last few years than you will ever in your career, so, bzzt. There is a reason the most popular Linux server distros lag so far behind on Python versions - upgrading to a new version almost always breaks *something* in existing code. Have had it happen SO many times... (and I still use it! It's a decent scripting language for readable, modular projects. Doesn't mean it's that good at backwards compatibility compared to other languages...)

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

            THIS clearly pro

            • by MichaelSmith ( 789609 ) on Sunday June 26, 2016 @03:34AM (#52391765) Homepage Journal

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

          • by mwvdlee ( 775178 )

            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.

            Backporting features and active development on versions "replaced" eight years ago aren't very good signs of backwards compatibility.

            And there's the excellent "2to3" tool which can quickly and reliably convert nearly all Python 2 code to Python 3 code

            Your definition of "backwards compatibility" seems to be different from the definition used by the rest of the world.

      • Java ran in the browser before javascript. It was a little slow at the time but what wasn't?

        • Java apps in the browser during that time frame was a pain. You never knew what would or wouldn't work.

          • The language, the runtime libraries and the browsers were all changing rapidly at the time. It got us to where we are now. Javascript got a head start by ignoring some of the stuff which made java a pain for new programmers, like strong typing and security.

            • by Z00L00K ( 682162 ) on Saturday June 25, 2016 @11:10PM (#52391201) Homepage Journal

              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.

        • by mwvdlee ( 775178 )

          Java competed with Flash, not with Javascript.
          Java, like Flash, was something that ran inside a rectangle on a page. Javascript ran as the page itself.

      • the JavaScript interpreter shouldn't be part of the browser, it should be stand alone and the html/css rendering engine should have an API/ABI which can be accessed by a variety of languages, and these languages should be independent from everything else as well.

        This is already happening. Its called webassembly. You can use whatever language you want.

        And in fact even before webassembly it was possible to use third party languages in html/css. You just needed a javascript polyfill that translates the language into javascript. Its a hack but it works.

        • It's not already happening. HTML / CSS ignores any rendering that's not JavaScript, or if you suck, vbscript.

          I have JavaScript disabled, and there is nothing on the web that in any way does graceful fallback to let me know that I'm missing some esoteric rendering engine. Maybe the foundation is laid,like F#, but it us not happening.

          Maybe I would have heard of webassembly, but obviously its not happening anywhere that matters. Because many sites just don't work without JavaScript.

    • by Shados ( 741919 ) on Saturday June 25, 2016 @10:59PM (#52391153)

      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.

    • by raymorris ( 2726007 ) on Saturday June 25, 2016 @11:47PM (#52391327) Journal

      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.

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

      Nothing.

      JavaScript and PHP are the two most fucked up and popular languages.

      Why?

      There are more shitty programmers then good programmers .

      Seriously, when a language has a fucking hack:

      "use strict";

      ...it only reinforces the shit that it was designed in 10 days. It like we learnt _nothing_ from all the languages of the 80's and 90's.

    • It's pretty straight-forward, the same exact reason Microsoft won out over everyone else with Windows: users do not matter, at all, they use what they are given. As much as they believe otherwise, web "developers" aren't programmers, they are power users of web browsers. As a result they got what developers were putting out for them to use and JavaScript, believe it or not, was the least horrible of all of the options.

      If web developers knew how to program well enough to create their own browsers (cross-pl

    • by Tony Isaac ( 1301187 ) on Sunday June 26, 2016 @08:40AM (#52392617) Homepage

      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.

      • 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.

        Why is it "good news for haters"? It's good news for everyone, just like SPIR-V.

    • Lots of knowledgeable people hate or dislike Linux, Unix and Windows, and have done so from the start, and give excellent reasons for their hate and dislike. But these systems have succeeded in spite of them and these reasons, and are more or less an indispensable part of modern on-line world currently. Why? What did these 'knowledgeable' people missed or still miss when evaluating them?
  • by MillionthMonkey ( 240664 ) on Saturday June 25, 2016 @09:04PM (#52390863)
    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!
  • by backslashdot ( 95548 ) on Sunday June 26, 2016 @02:05AM (#52391611)

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

  • I was very much looking forward to await/async as a more mature way to natively provide clean synchronous wrappers for async code within synchronous code (and get around the nested hell of when/then). Please correct me if I'm wrong, but it only seems to be a future reserved word.

    Right now, it appears I am still awaiting.

    • Oh don't get me started on async/await! When I first saw these in C#, I was excited to see a simple, clean way to hand off tasks to background threads. But in practice, it was TOO easy. Worse, the design is viral, once you have async/await one place in the code, you have to start using it in everything that calls that code, and pretty soon it takes over the entire application. Novice programmers started putting async/await statements EVERYWHERE, instead of just in the places where you really need a back

    • Yeah, you have to wait, that is ES7.

  • by Tony Isaac ( 1301187 ) on Sunday June 26, 2016 @08:52AM (#52392675) Homepage

    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.

  • We all agree we hate Javascript. So why aren't there any alternative scripting languages in the browser yet?
    • by tepples ( 727027 )

      Would you have preferred VBScript?

      • by jon3k ( 691256 )
        That's kind of a false dichotomy. I'm not saying that given the choice 20 years ago VBScript vs Javascript that I wouldn't have chosen Javascript, the question is since then why haven't we seen anything else? I'm still holding out hope for Python in the browser [brython.info].
  • Kill JS and put python in the browser: http://www.brython.info/ [brython.info]

Think of it! With VLSI we can pack 100 ENIACs in 1 sq. cm.!

Working...