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

165 comments

  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: 0, Troll

      Trump supporters, Brexit leavers, Javascript developers, PHP programmers... They are all large in numbers.

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

      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 everything else as well.

      Some will say it is a security nightmare, but so is everything about the internet. You could sandbox if you wanted still. And whatever.

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

    4. Re:hated language becomes a success by Dahamma · · Score: 1, Insightful

      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 support, among other things.
       

    5. Re:hated language becomes a success by MichaelSmith · · Score: 1

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

    6. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      Nobody missed anything.

      Javascript got where it is the same way Adobe got where it is: By being the only girl at the dance.

      Javascript is an utter piece of shit language, developed and evangelized by people who were ignorant of history, afraid of parentheses, and just crappy programmers all around.

    7. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      I hate JavaScript. Hate hate hate hate hate this language. Hate it. Hate every simpering stupid vacant programmer-insulting aspect of it. Hate the sensibility that thought anyone would like it. Hate the implied insult to the developer community by its belief that anyone would be taken by it.

      "JavaScript" is a bad language - one of the worst languages ever made. But it is not by a bad person, and must represent some sort of lapse from which Eich will recover - possibly sooner than I will.

    8. Re:hated language becomes a success by Crashmarik · · Score: 1

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

    9. Re:hated language becomes a success by MichaelSmith · · Score: 1

      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.

    10. Re:hated language becomes a success by NotInHere · · Score: 1

      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.

    11. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      > Java ran in the browser before javascript.

      Sure, in HotJava which nobody used. The first mainstream browser to run it was Netscape Navigator 2.0, which introduced JavaScript at the same time.

    12. Re: hated language becomes a success by Anonymous Coward · · Score: 0

      They are not "knowledgable people"!

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

    14. Re:hated language becomes a success by Z00L00K · · Score: 0

      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.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    15. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      Why ask others to do rudimentary and obvious research for you? If you cannot figure it out just by looking at where the language is used, if it had any competitors, and who is backing it, then you are just upset that it's popular, yet have nothing to offer but another pointless flamewar.

    16. 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.
    17. Re:hated language becomes a success by Bite+The+Pillow · · Score: 0

      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.

    18. Re:hated language becomes a success by UnknownSoldier · · Score: 0

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

    19. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      That the alternative to Javascript as the web's scripting language was fucking BASIC. As the web became the universal platform, Javascript became the universal language. No mystery there.

    20. Re:hated language becomes a success by mwvdlee · · Score: 1

      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.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    21. Re:hated language becomes a success by NicknameUnavailable · · Score: 1

      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-platform desktop applications capable of displaying virtually anything and changing dynamically per user requests) they probably would have done the same thing because ultimately the user is just a user and will use what they are given.

      In case anyone asks about the Microsoft bit - desktop and server application-space developers are the power users of operating systems, Microsoft put out the best development tools for a very long time - not to say Visual Studio isn't horribly slow obtuse garbage at a great many things just like VB6 before it and VB3 before it and QBasic before it, but it has for a very long time been the best of a bunch of shitty options.

    22. Re:hated language becomes a success by Anonymous Coward · · Score: 0, Informative

      Nothing else runs clientside in browsers.

      It's a horrible garbage language, but it's the only one that does what it does - clientside in browsers, and supported by all browsers. It was developed and released as part of Netscape Navigator back when that was the only game in town, and everyone else adopted it accordingly.

      Name one expert who said "this language will be widespread and commercially successful". I bet anything you like all anyone ever said was "this language is shit because of its bad language features". It didn't succeed due to any actual merits, but by being the only thing that does what it does, at the right time in history.

    23. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      It's not uncommon for the less or even worst viable option to win in the tech world. The original IBM PC is an example of this. You might also consider NextStep or Geos vs Windows or VHS vs Betamax.
      The reasons for success of the least fittest varies but there's always an uncounted variable in play. Usually its just that the worst is the least encumbered IP.

    24. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      Javascript is today's Visual Basic....

    25. Re:hated language becomes a success by Anonymous Coward · · Score: 0, Troll

      Haskell sucks for one very important reason: it's obtuse.

      Want to know why PHP kicked Perl's ass 15 years ago? Because self-important idiots thought it was a great idea to write code that looked like line noise, and praised each other on how clever they were. PHP, in contrast, was, and is, extremely user-friendly. It goes out of its way to make the tasks for which it was designed as painless as possible.

      Perl catered to pompous, yet laughably incompetent, basement dwellers who thought their write-once code was a sign that they were geniuses. PHP catered to developers who wanted to get things accomplished. PHP won, and rightly so.

      Programming languages are designed for people, to make writing programs easier. Any language that makes programming difficult is a massive failure of a language. That's Haskell in a nutshell. It doesn't matter what technical argument you want to make as it's completely irrelevant.

      As this article is about Javascript, I'd like to point out that it's incredibly successful in that regard. It brought formerly advanced programming concepts to the masses in a way that's simple to understand and almost idiomatic to use. It's the best of both worlds.

      You want a language like Haskell to go mainstream? Cut the obtuse syntax and other finicky bullshit and build a language that's accessible.

      Oh, and stay well-clear of that classical OO obsession we see infecting so many languages these days. That junk failed ages ago. All that fad gave us was dramatically larger code bases and massively increased complexity. Javascript didn't get all of it right, but the prototypal approach it uses is superior in just about every possible way to the shit we see in Java, C#, Python, etc.

    26. Re:hated language becomes a success by Zontar+The+Mindless · · Score: 1

      I think we've found our Lisp programmer.

      --
      Il n'y a pas de Planet B.
    27. Re:hated language becomes a success by Zontar+The+Mindless · · Score: 1

      JS is not and never has been limited to the client. NS-SSJS is long gone, but to this day, you can write ASP/ASP.Net code in JScript and IIS will run it just fine. There are other examples if you care to find them. And I've been hearing lately about something called "Node.JS"...

      There are lots of other environments supporting JS as well.

      --
      Il n'y a pas de Planet B.
    28. Re:hated language becomes a success by Anonymous Coward · · Score: 0

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

      I've found that lots of knowledgeable people actually learn to love javascript. The initial hate fades as people learn that the core of the language is based on functional programming paradigm. They also learn that the javascript community has found out about this, too. I mean, look at libraries and frameworks like React (with Flux frameworks like Redux), Immutable.js, etc. To me at least, as an old javascript sceptic, this is cool stuff that puts many programming languages and tools to shame.

      To my own experience, the next step is to learn that many of these cool ideas have been borrowed from languages like Clojure. And when one discovers Lisp, there is no turning back...

    29. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      There are many reasons why Haskell isn't a popular language, but having an obtuse syntax isn't one of them. You obviously have never answered a Haskell beginner's questions so I'll tell you about the sort of things people have trouble with in Haskell :

          - the lack of implicit mutable state, which keeps them from resorting to the "usual" control structures (what use is a loop if it can't modify anything ?)
          - the complexities of the type system, which keeps them from getting away with unspecified semantics
          - and the tooling, which I'll admit seems designed to be difficult to use

      Of those reasons, I'd bet the tooling is the one that really keeps people away from Haskell : once written and tested, a Haskell program is often still difficult to deploy on all platforms. JavaScript, on the other hand, just has to be sent to the client, so I understand the appeal.

      As to the matter of the "finicky bullshit", what exactly should we get rid of, O wise one ? Should we get rid of the type and class system (which I should mention is infinitely better designed than "that OO junk", as you so eloquently put it) and force programmers to write test upon test to dynamically enforce static invariants ? Or perhaps you want to get rid of the first-class functions because you find them confusing ? Otherwise, there's not much else you can take away, because -- Haskell being a well-designed language and all -- there isn't much bullshit to go around.

      JavaScript was "just there", so it won the popularity contest. You want proof that Haskell is better ? Even with awful tooling, and a community more than 1000 times smaller than JavaScript's, we still manage to pose enough of a threat for you to write hate posts. That's how good Haskell is.

    30. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      Actually what Microsoft pushed was a pluggable script engine, the same one it used for automation scripting. It included JavaScript and VBScript out of the box but you could install any number of third-party libraries that could then be used in browser script tags, such as python, perl, ruby, php, tcl, lua, fortran, etc.

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

    32. Re: hated language becomes a success by Anonymous Coward · · Score: 0

      Adobe was not the only girl at the dance there was macromedia and a slew of others slugging it out feature for feature for a decade. remember flash as made by macromedia there was also fractal design's painter, x-res, freehand, and more. All compatible to want Adobe was offering.

    33. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      python sucks compared to javasript. Ive been ripping python out of my server side in order to replace it with nodejs.
      Huge performance gains and a radical simplification of the code base are nice side effects of no longer having to support
      such a broken language as python.

    34. Re: hated language becomes a success by Anonymous Coward · · Score: 0

      So you replaced one broken language, with another broken language? Bravo sir.

    35. 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 (

    36. Re:hated language becomes a success by K.+S.+Kyosuke · · Score: 1

      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.

      --
      Ezekiel 23:20
    37. Re:hated language becomes a success by K.+S.+Kyosuke · · Score: 1

      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?

      --
      Ezekiel 23:20
    38. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      Spineless SJWs, feminists, communists, people jealous of success and freedom, they are even larger in number.

    39. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      I know this will be extremely unpopular around here, but, the better solution is to distribute thick client binaries if the goal is to execute code on the machine. These would then be subject to the security policies of the operating system set by the user (eg proper virtualization for untrusted code). This is far better than the current situation where the browser downloads and executes whatever javascript is present and the system is only protected by the good graces of the browser process. The browser should be relegated to passive document rendering (stylesheets at best).

      Of course, this concept would upset marketers, governments, and anyone else who wants to compromise the user and/or admin's network.

    40. Re:hated language becomes a success by TFlan91 · · Score: 1

      Don't mind me, just butting in!

      > 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 [globalpost.com] party! (Yes, I know CCP doesn't official stand for that.)
      > Don't assume. You look like an tool when you do.

      Can do this in JS too, but shh, don't tell anyone.

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

      Then don't do it? It's like saying "hey, that gun will kill someone if u pull the trigger while pointing at them!" - duh.

      Google any big int lib.

      > Javascript broken == operator [github.io] is so fucked up it is laughable. WTF is the point of even having '==' when every smart programmer will use '==='
      > instead???
      > if( 0 == "0" ) console.log( "equal" ); // equal // WTF!?

      You answered your own complaint... use strict equals. Type conversion is a feature, not the languages problem someone doesn't understand it.

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

      Didn't they just introduce modules? I can't remember... but in case I partied hard, blacked out and forgot about ES2016, there's a nifty lib called requirejs that
      handles this.

      > When Javascript does stupid shit like Automatic Semicolon Insertion (ASI)

      Since my very first day programming JS, almost 7 years ago now (holy shit), this has NEVER been a problem.

      > Where is the automatic multi-line string concatenation?? Even C has this. In Javashit you're forced to do this manually. Hell, even the retarded Python has """
      > for crying out loud!

      Introduced that with `

      > WHY did it take until ECMAScript 5 to fix the retarded string-to-octal parsing?? In what fucked up world did:

      Meh, got me there.

      > When {} + [] returns ZERO, and {} + {} returns NaN you know the designer was an fucking idiot. This is _basic_ Comp. Sci. 101 stuff, not rocket science.

      I don't think I've ever actually tried to add an object and/or array to each other... Unless someone forgot how their code works...

      > for( var x in [5,6,7,8]) console.log( x + 1 );

      For in is the worst... But again, learn the language and again, this hasn't ever been a problem for me.

      > Popularity doesn't prove jack shit,

      Clearly it does.

      > I love when some retard tries to claim that "I don't understand the language."

      Not saying you dont understand the language, you clearly do. Just saying that any JS developer worth their salary knows these pitfalls and knows how to get
      around them or not have them be in the way in the first place.

      Now with Typescript making some headway, half these issues you outlined just magically disappear. (I don't use Typescript... yet, my feeling is that if you can't
      program JS correctly, then having some tool do it for you, hinders you rather than helps you.)

      ---

      All languages have their issues, yes JS may have some basic ones that make other language developers go "wtf", as you clearly are, but clearly these fallacies
      are not blocking anyone from using the language for really cool programs.

      But I digress to what I previously stated.

      Any JS developer worth their salary doesn't run into these issues and/or knows how to combat them.

    41. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      Where do you see good languages catching on?

    42. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      Can do this in JS too, but shh, don't tell anyone.

      Um, it's WebGL. Of course you can do it in JavaScript, because that's what WebGL is.

      I think you missed the point of each one of his remarks. For example, if he's doing 60fps shaders and is asking for native 64-bit ints, a bigint library that offers arbitrarily sized ints isn't going to give the performance he needs.

    43. Re:hated language becomes a success by tepples · · Score: 1

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

      Then don't do it? It's like saying "hey, that gun will kill someone if u pull the trigger while pointing at them!" - duh.

      Google any big int lib.

      Could you share your experience with the runtime performance (or lack thereof) of available big int libs for JavaScript?

      You answered your own complaint... use strict equals.

      Do there also exist strict less than and strict greater than?

      Didn't they just introduce modules?

      What they did "just introduce" is irrelevant as long as the client remains stuck on ECMAScript 5.

      any JS developer worth their salary

      Perhaps the problem is that the gotchas in the language make most ECMAScript developers not "worth their salary" by that measure.

    44. Re:hated language becomes a success by Anonymous Coward · · Score: 0

      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.

      Well, why the hell are you using parseInt() on a string representing a number greater than Number.MAX_SAFE_INTEGER?

      If you pull stupid shit like that, of course it's going to fail. As a professional programmer, you should know better. :-P

  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 Anonymous Coward · · Score: 0

      Only on the server side.

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

    3. Re:The power operator? Really? by Anonymous Coward · · Score: 0

      +1! LOL

    4. Re:The power operator? Really? by Anonymous Coward · · Score: 0

      On the client side, it will still be imported, but it will be referenced as a non-local, non-CDN file link.

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

      Thank God for unit tests

      Handy when static analysis is all but impossible.

    6. Re: The power operator? Really? by Anonymous Coward · · Score: 0

      Gold!

    7. Re:The power operator? Really? by Z00L00K · · Score: 1

      And who's using it on server side?

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    8. Re:The power operator? Really? by MillionthMonkey · · Score: 1

      Not just on the server side. You can have Webpack include it in your 300 KB bundle.js that gets sent to the browser.

    9. Re: The power operator? Really? by Anonymous Coward · · Score: 0

      We actually develop code that looks just like that at my job.
      Super enterprisey done for a big govt agency. :-(

  3. that's fine and all... by Anonymous Coward · · Score: 0

    Just don't expect me to enable it in my browser for 99.9% of web sites.

    Because that would be idiotic.

    1. Re:that's fine and all... by Anonymous Coward · · Score: 0
  4. Too bad on async functions by Anonymous Coward · · Score: 0

    Some background on async functions: http://www.infoworld.com/artic... To be fair, it was a mammoth endeavor to add proper async support in just a few months.

    1. Re:Too bad on async functions by MichaelSmith · · Score: 1

      I don't see how locking between threads can work when their entire namespace is so mutable.

  5. Small changes by Anonymous Coward · · Score: 0

    Very surprised that we've already moved to ES7, especially considering how much ES6 changed.

    Changes are really minor. Can now write a**b instead of Math.pow(a,b) or ar.includes(x) instead of ar.indexOf(x)>=0. Nice, but I'll still use the old methods if just for compatibility's sake.

    1. Re:Small changes by TFlan91 · · Score: 1

      This is where that pesky win10 upgrade actually helps web developers.

      Win10 has "Edge", crap browser, but in terms of compatibility, we can stop worrying about fuckin IE 8, 9, 10, and 11... Bout damn time.

  6. 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 Anonymous Coward · · Score: 0

      Somebody should mod up the parent. Unlike the other comments it actually makes some technical arguments!

    2. Re:But JavaScript isn't a success. by 93+Escort+Wagon · · Score: 1

      Somebody should mod up the parent. Unlike the other comments it actually makes some technical arguments!

      You mean technical arguments such as conflating server-side and client-side implementations of javascript?

      I don't see any particularly technical arguments there - it's mostly just hand-waving.

      --
      #DeleteChrome
    3. Re:But JavaScript isn't a success. by Anonymous Coward · · Score: 1

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

    4. 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.
    5. Re:But JavaScript isn't a success. by Anonymous Coward · · Score: 0

      Basically this.

      "Javascript is bad because bad things like Node.js and npm use it. And the reason those are bad is because they use Javascript, which is bad."
      "Javascript is bad because it has a bad community, which is bad because they don't realise that Javascript is bad."

      And so on.

    6. Re:But JavaScript isn't a success. by Anonymous Coward · · Score: 1

      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.

    7. Re:But JavaScript isn't a success. by Anonymous Coward · · Score: 0

      It didn't have real class OO for ages

      I considered that a "feature" that kept copy n' paste Java/C++ devs away.

    8. Re: But JavaScript isn't a success. by Anonymous Coward · · Score: 0

      Server side or client side, it's doesn't matter. The language is a nightmare to work with.

      Disclaimer: JavaScript developer for 5 years now. Currently looking for a new job. :(

    9. Re:But JavaScript isn't a success. by Anonymous Coward · · Score: 0

      Freedom... Right... On anything beyond "hello world" having "freedom" means you can fuck up a project very easily.

      Seriously - JavaScript has some *really stupid* quirks^Wfeatures. "Truthy" for fuck sake - 'nuff said.

    10. Re:But JavaScript isn't a success. by Anonymous Coward · · Score: 0

      Boolean values are true or false, that's it.

      C doesn't have booleans, it has truthy and falsy integers. In C, 0 is "false" and anything non-zero is "true" ... tell me how that's not just as fucked up.

    11. Re:But JavaScript isn't a success. by K.+S.+Kyosuke · · Score: 1

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

      --
      Ezekiel 23:20
    12. Re:But JavaScript isn't a success. by Anonymous Coward · · Score: 0

      argumentum ad antiquitatum

    13. Re:But JavaScript isn't a success. by Anonymous Coward · · Score: 0

      I don't see any particularly technical arguments there - it's mostly just hand-waving.

      Handwaving? The list of Javascript technical failings is dismally long (take the catalog of type-system gotchas, such as the awful ambiguities that come from overloading the + operator) and affects every possible implementation, whether server side, client side, embedded or (God help us) in the internals of a grafted-on privilege-control system.

    14. Re:But JavaScript isn't a success. by Waccoon · · Score: 1

      ...if you know how to use them.

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

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

    16. Re:But JavaScript isn't a success. by allo · · Score: 1

      I like the elaborate reasoning of your argument and now i am fully convinced.

  7. Why is it not ^? by Anonymous Coward · · Score: 0

    We all expect 2^16 to return 65,536. Why make it something different?

    1. Re: Why is it not ^? by Anonymous Coward · · Score: 0

      Because it's JavaScript. It's main selling point is that it is different.

    2. Re:Why is it not ^? by jdavidb · · Score: 1

      Actually for most languages I have used in the last 20 years, it is **. My son recently got into programming and his first programming language used ** as well. At this point I don't remember what language I learned that used ^. I remember in one language that was bitwise negation or something and never did what I wanted.

    3. Re:Why is it not ^? by Anonymous Coward · · Score: 1

      Most of us with programming experience would expect 2^16 to return 18. I take it that you mainly use BASIC, right?

    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:Why is it not ^? by MillionthMonkey · · Score: 1

      We all expect 2^16 to return 65,536. Why make it something different?

      No, I expect 2 << 15 to return 65536. The ^ is the XOR operator.
      Having bitwise operators explained to you by JavaScript programmers must be a soul-crushing experience.

    6. Re:Why is it not ^? by Anonymous Coward · · Score: 0

      ^ is exclusive or (xor)

    7. Re:Why is it not ^? by Anonymous Coward · · Score: 0

      > At this point I don't remember what language I learned that used ^.

      Probably BASIC.

    8. Re:Why is it not ^? by scm · · Score: 1

      I'm pretty sure ** goes back to at least Fortran (though you may very well have seen it somewhere else). Javascript already uses ^ for bitwise XOR

    9. Re:Why is it not ^? by Anonymous Coward · · Score: 0

      I just typed "2^16" into bc, and it returned 65536. You're wrong about what people expect.

    10. Re: Why is it not ^? by Anonymous Coward · · Score: 0

      Only people over 50 use that program. No one expects 2 to the 16 to return 65,536 in any modern programming language.

    11. Re: Why is it not ^? by Anonymous Coward · · Score: 1

      JavaScript never does what is expected. This is a feature.

    12. Re: Why is it not ^? by Anonymous Coward · · Score: 0

      This. JavaScript is important because it doesn't do what is expected.

    13. Re:Why is it not ^? by MillionthMonkey · · Score: 1

      I just typed "2^16" into bc, and it returned 65536.

      BC? Oh yeah, I remember- that was the most popular programming language Before Christ.

    14. Re: Why is it not ^? by Anonymous Coward · · Score: 0

      bc isn't something only old people use.

    15. Re:Why is it not ^? by Anonymous Coward · · Score: 0

      Might be Pascal. Too drunk to look it up right now.

    16. Re:Why is it not ^? by _merlin · · Score: 1

      In Pascal, ^ deferences a pointer, as in recptr^.field = value. Some extended Pascal variants used ** as power operator.

    17. Re:Why is it not ^? by Anonymous Coward · · Score: 0

      I just typed "2^16" into bc

      Fuck, you're old.

    18. Re:Why is it not ^? by Anonymous Coward · · Score: 0

      I would expect 2^16 to return 18.

    19. Re: Why is it not ^? by Anonymous Coward · · Score: 0

      You're an idiot. Languages like C, C++, C#, Objective-C, Swift, Python, Java, PHP, Ruby, Perl, and countless others all use ^ as bitwise xor.

      I guess if the only languages you're familiar with are variations of Basic, that's what you'd expect. That's the only language I can recall, off the top of my head, that uses the ^ operator for anything but bitwise xor.

    20. Re: Why is it not ^? by Zontar+The+Mindless · · Score: 1

      ^ is bitwise OR, just as it is in countless other languages, e.g. C, C++, Perl, Java, to name a few.

      --
      Il n'y a pas de Planet B.
    21. Re:Why is it not ^? by Anonymous Coward · · Score: 0

      It's from Fortran. ^ was used for something else, but I can't remember what.

    22. Re: Why is it not ^? by Anonymous Coward · · Score: 0

      ^ is bitwise OR, just as it is in countless other languages, e.g. C, C++, Perl, Java, to name a few.

      Actually XOR. OR is |.

    23. Re: Why is it not ^? by Anonymous Coward · · Score: 0

      Well, it can be one or the other, but not both.

    24. Re: Why is it not ^? by Anonymous Coward · · Score: 0
    25. Re:Why is it not ^? by Anonymous Coward · · Score: 0

      > No, I expect 2 15 to return 65536

      Strawman fired.

  8. New javascript by Anonymous Coward · · Score: 0

    Now with native fag support

    1. Re:New javascript by Anonymous Coward · · Score: 0

      Oh just !

  9. Awesome! by Anonymous Coward · · Score: 0

    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.

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

    2. Re:Awesome! by hcs_$reboot · · Score: 1

      Cobol was designed almost 60 years ago. No doubt that if Cobol was created today, it wouldn't stand a chance. Fortunately Javascript is unlikely to resemble that fossil, ever.

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    3. Re:Awesome! by mwvdlee · · Score: 1

      Cobol was designed almost 60 years ago. No doubt that if Cobol was created today, it wouldn't stand a chance. Fortunately Javascript is unlikely to resemble that fossil, ever.

      Modern Cobol might have a prettier syntax, but the language features itself are still rather unique and, for it's specific niche of batch programming, superior to alternatives. There are still very few language that can consistently beat Cobol on performance for batch programming.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    4. Re:Awesome! by Hognoxious · · Score: 1

      Fortunately Javascript is unlikely to resemble that fossil, ever.

      Yeah, it's nearly as terse.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  10. 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 guruevi · · Score: 1

      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 it is a bit ... buggy to say the least while JavaScript (like PHP) is a lot more promiscuous which, if you don't know how to program "Integer vs Float ... I just want a number, JS conveniently treats all numbers as Floats".

      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.

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    2. Re:Have you ever actually used Python?! by Anonymous Coward · · Score: 0

      > When every byte counts (remember, 56k modems), how do you minify the spaces?

      Huh? Are you implying that JavaScript didn't typically use indentation before minification became a thing?

    3. Re:Have you ever actually used Python?! by Dahamma · · Score: 0, Flamebait

      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 proves you have no clue about any modern deployment techniques for HTML5 apps (minification, obfuscation, etc). Yes, of course you can minify Python, but it's just not going to be as efficient. But whatever. The fact is the current mainstream implementations are not designed for client-side browsers. Someone could build/integrate something (maybe PyPy?) but they haven't. Clearly there is a reason for that - and that is that Python doesn't really solve many of the problems people have with Javascript, so why bother?

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

      Oh fuck off. Feel free to post as non-AC, otherwise your opinion is useless. I have (non-Python) code used on many millions of consumer devices, and Python scripts on backend projects generating video content for those devices. Come back when you have ANYTHING useful to contribute to the discussion...

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

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

    5. Re:Have you ever actually used Python?! by mwvdlee · · Score: 1

      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.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    6. 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.

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

    8. Re:Have you ever actually used Python?! by Zontar+The+Mindless · · Score: 1

      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.

      You obviously know first-hand something of what you're talking about. What are you doing in this discussion, anyway? :-D

      --
      Il n'y a pas de Planet B.
    9. Re: Have you ever actually used Python?! by Ilgaz · · Score: 1

      The post you took serious to reply is really a troll I think, even my 14.4K modern did excellent compression for trivial things like white spaces and HTML. I was using IBM Global Network while it was SLIP based which didn't have protocol compression, modem handled it damn fine on hardware level.

    10. Re: Have you ever actually used Python?! by Anonymous Coward · · Score: 0

      "On the hardware level"

      What about the software side of things? You know, what we are discussing here.

    11. Re:Have you ever actually used Python?! by Dahamma · · Score: 1

      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.

      Yes! Please show me a valid Python function in a single line embedded in HTML. Python devs made their choices and adamantly stick to them, but sometimes choices can limit the application of a language in theory or practice...

    12. Re:Have you ever actually used Python?! by Anonymous Coward · · Score: 0

      Newlines and whitespace in HTML/XML attributes are explicitly allowed. Javascript also has semicolon insertion rules that can make whitespace meaningful (e.g. in the case of `return`). See here and here for the definitions.

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

      Work was boring.

    14. Re:Have you ever actually used Python?! by allo · · Score: 1

      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.

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

    1. Re:Same reason it is bad - done in 10 days by Anonymous Coward · · Score: 0, Troll

      Brendan had the right ideas and something very good was built up around it. Brendan was fast, correct and he f* built the right future-vision forward-looking tech at a very confusing time.

      A genius derives a better hubble-constant with a pocket-calculator in 30 seconds rather than relying on measurements done over years and years, requiring endless staff and hardware and costing billions.

      But I hear you say that genius is not to be trusted as plodding normals will always produce better because 'oh look how hard they worked'. Then you profile your self by misrepresenting and critiquing someone and the history around his work. Someone that has out-impacted you by magnitudes.

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

    1. Re:ECMA by Zontar+The+Mindless · · Score: 1

      ECMA International has its headquarters in Geneva, Switzerland. A European but non-EU country, in case you didn't know.

      --
      Il n'y a pas de Planet B.
  13. Can somebody mod down Dalilama's bullshit? by Anonymous Coward · · Score: 0

    Can somebody please mod down the parent? It's totally full of 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.

    The funniest part of this bullshit claim is that whatever you've supposedly done using Python, well, it likely depends on and uses the C and Python code I've contributed to the CPython implementation over the years! Son, you're out of your league.

    THIS clearly proves you have no clue about any modern deployment techniques for HTML5 apps (minification, obfuscation, etc).

    You're the one who is out of touch, clearly. We serve compressed content these days, which actually is more effective than JavaScript hacks like minifcation. If you want to obfuscate your Python code, there are numerous products out there that will do that. Or Python's bytecode could potentially be served up instead, were the browsers ever to support Python for client-side scripting.

    Son, you have no idea what you're talking about. You've demonstrated that repeatedly.

    1. Re: Can somebody mod down Dalilama's bullshit? by corychristison · · Score: 1

      To be fair, we (web developers) minify and compress everything, or atleast we should. You don't know who is on the other side of the connection, or what kind of bandwidth they have available so always try to cater to the largest target you can.

      I also don't depend on huge JS libraries/frameworks, because I avoid JS if I can, but that's just me. Anything outside of basic DOM manipulation (show/hide elements, change this string to that value, etc) it just turns into a pain in the ass. I try to do all of the logic on the server side.

      Unfortunately server side operations/logic falls flat when you try to do anything mildly interactive (games)... so I see where it would be very useful to have some kind of universal interface to utilize more than just ECMAScript/Javascript.

    2. Re:Can somebody mod down Dalilama's bullshit? by Dahamma · · Score: 1

      The funniest part of this bullshit claim is that whatever you've supposedly done using Python, well, it likely depends on and uses the C and Python code I've contributed to the CPython implementation over the years! Son, you're out of your league.

      Who cares? If you run Linux or streamed video you are probably using code I contributed, big fucking deal. In the end you are STILL posting AC, so you are by definition a bullshitter until proven otherwise. And WTF is with the "son"? Get your own voice, don't borrow it from whatever shitty media you borrowed it from. It helps your argument ZERO to sound condescending without any advantage.

      You're the one who is out of touch, clearly. We serve compressed content these days

      Not sure who "we" is, but web servers serve what browsers, CDNs, etc support. You'd be surprised at how many CDNs and embedded browsers have issues with compressions /w HTTP(S). To just "leave it up to someone else" as your solution implies is lazy, to say the least.

      Or Python's bytecode could potentially be served up instead, were the browsers ever to support Python for client-side scripting.

      But really in the end that's pretty much it. I can give you the benefit of the doubt that you have done a lot of work on Python, but it still means jack and shit in this context until someone actually DOES that. And they won't. Because Python is a decent language in some respects, but it's horribly shitty for this purpose.

    3. Re: Can somebody mod down Dalilama's bullshit? by allo · · Score: 1

      remove one ad from your site and you'll saved more than obfuscating the js file does.

      despite this, compression is part of http for a long long time.

    4. Re: Can somebody mod down Dalilama's bullshit? by Dahamma · · Score: 1

      Obfuscation != minification or compression. Obfuscation is for making the Javascript harder to read (in an imperfect attempt to provide extra security or protect IP). Minification is for making the text smaller (though it's usually pretty good at obfuscating in the process), and compression is for making the transfer smaller.

    5. Re: Can somebody mod down Dalilama's bullshit? by allo · · Score: 1

      so, then please debug an minimized script. Of course minifying obfuscates the script. And compression makes it unneccessary. That's the point.

    6. Re: Can somebody mod down Dalilama's bullshit? by corychristison · · Score: 1

      Never built a site that had ads on it, so I'm not sure what the hell you're talking about.

    7. Re: Can somebody mod down Dalilama's bullshit? by corychristison · · Score: 1

      No. You clearly don't do this stuff, so you really shouldn't be commenting on it if you don't know what you're talking about.

      Minification makes the payload smaller. Compression is limited to gzip or deflate. If you compare original source compressed to minified source compressed the minified compressed will be smaller. Anywhere from 5-20% smaller in my own testing.

      Some minification techniques will replace local variable names with smaller variable names, decreasing payload size in a way that compression cannot.

      See Google's guide for more information: https://developers.google.com/...

    8. Re: Can somebody mod down Dalilama's bullshit? by allo · · Score: 1

      I bet you visited one in your life ;-).
      Now compare: a 500kb banner less or shrinking your js/css from a total of 50kb down to 30kb?
      The banner is loaded dynamically, the css and js are cached for two weeks.

      You see what i am talking about. And most ad systems need more than 500 kb of traffic nowadays

    9. Re: Can somebody mod down Dalilama's bullshit? by allo · · Score: 1

      I think you did not really try it. Compressing a long variable name and uneeded whitespace is just as good as minification. A compression algorithm is optimized for making redundant data small and of course everything which can be minified contains redundancy, that's why you are able to shrink it.
      And you're elegantly ignoring the other point, that your minified js file is cached for two weeks or something similiar. No need to use something minified.

    10. Re: Can somebody mod down Dalilama's bullshit? by corychristison · · Score: 1

      A users first impression of a website is how quickly it loads initially. Caching doesn't help here.

      I have tested Minification with Compression, and just straight compression. In all of my testing, Minification with Compression always wins. This is for both JS and CSS.

    11. Re: Can somebody mod down Dalilama's bullshit? by allo · · Score: 1

      how big is your gain?

      I would rather recommend to use less js, especially as it all adds processing time (which is normally single threaded in a browser ...)
      A nice option is to replace a big jquery or similiar with http://vanilla-js.com/. Almost all functions you really need are already included, even those which needed jquery in the past.

    12. Re: Can somebody mod down Dalilama's bullshit? by corychristison · · Score: 1

      I've already posted above that I don't use big libraries... really basic things like DOM manipulation, the odd modal window, and some iframe stuff.

      As an example, a site I built recently for a local church has a single JS file called core.js. The original file is 14340 bytes. Compressed it is 3732 bytes. Minified and compressed it is 2792 bytes.

      Another example, a project I built last year, is a web based document management system for an appliance manufacturers customers (dealers/retailers/distributors) to access product documentation (service manuals, marketing materials, etc), there is a total of 3 JS files. Each file is only loaded on pages it is needed.
      portal.js - orig 7959 bytes - compressed 1971 bytes - minified/compressed 1636 bytes
      rpc.js - orig 2088 bytes - compressed 819 bytes - minified/compressed 554 bytes
      admin/docs.js - orig 1543 bytes - compressed 526 bytes - minified/compressed 405 bytes

      Now these are pretty small files, as I've mentioned already I don't do very much JS. Some example CSS files from the document management system:
      structure.css - orig 12589 bytes - compressed 2615 bytes - minified/compressed 2128 bytes
      responsive.css - orig 7227 bytes - compressed 577 bytes - minified/compressed 433 bytes
      forms.css - orig 5951 bytes - compressed 1262 bytes - minified/compressed 1097 bytes

      For the record I use a fairly simple PHP-based CSS and JS minification classes to perform the minification. The compressed sizes are with 'gzip -9' compression.

    13. Re: Can somebody mod down Dalilama's bullshit? by allo · · Score: 1

      You're talking about 300 bytes per file. What data rate do you expect your clients to have on average? How big is your smallest ad (or even the script loading the ad)?

      > AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      > AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      > AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      > AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      > AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

      That's what we're talking about. I am thankful when you try to save me these 300 bytes, but it's easier for example to stop using some barely related stock images in each article on a news site, costing 800kb to 2 mb, than cutting 300 bytes of a file, which is cached after the first visit.

      Many people DO minification, but i think it's one of the most overrated optimizations out there.

    14. Re: Can somebody mod down Dalilama's bullshit? by corychristison · · Score: 1

      You keep bringing up ads... I don't put ads on my sites. I develop web based applications for businesses, with the odd small business and community organization websites sprinkled in.

      I've written a script that sits between static files and the web (or a CDN depending on the project) to automatically optimize all of these things for me, so I don't even have to think about it anymore, it just does it automatically.

      The script also optimizes images (with optipng, jpegoptim, etc). It even goes as far to do image scaling based on a GET parameter (eg. ?scale=WxH) using ImageMagick. It automatically caches the optimized files and serves them up. It watches the file modified time of the original files to ensure whenever a change is made, the cached optimized files are updated on demand as well.

    15. Re: Can somebody mod down Dalilama's bullshit? by allo · · Score: 1

      I am bringing up ads, because most of the "we need to optimize!" people are putting ads on their page, which are way bigger.
      I wanted to bring up optipng, as its a lossless way to optimize. But i think the important load time has your assets cached. People coming from a search engine are used to wait 3-5 seconds. People clicking a link on your page, they should get the stuff from cache, so the next page needs less than one second. Server side scaling is useful. If you should use imagemagick (which is slow and insecure btw) or something like GD, i would rather have a set of sizes instead of doing it dynamically. You will not that often need width=101, so just use image_w100.png for it (and DO NOT scale it one the client).
      And there we are at browser testing. for example mozilla browsers have a bad record on client side scaling of images. blink now has srcset to provide different sizes and as far as i have seen they scale images smoothly (down).
      But on JS i still think the best performing script is the one you can remove from your site. Not everything needs to be 100% dynamic. I understand that mobile pages may want stuff like jquery mobile, but a desktop page with html and css is often just fine. Even "responsive" CSS is often rather annoying, when the site changes only because i resize the window.

    16. Re: Can somebody mod down Dalilama's bullshit? by corychristison · · Score: 1

      I'm aware of all of this. I started developing web applications around 1998.

      I use ImageMagick because in my testing it was faster at the time for bicubic resizing/scaling. I'm using the Imagick PECL extension, which mostly eliminates the security and speed issues as it wraps the library into a PHP extension. I've written it to never scale an image up. If you specify a height and width larger than the original file, you'll be served the original file... So someone smart enough can't fiddle and blow up images wasting server resources.

      The point of having it dynamic is that I don't have to go out of my why (which interrupts my workflow) to fire up a graphics editor and make multiple scaled versions of an image. That, and 95% of the time the websites are operated and managed by whomever I create them for. Having a way to scale images for technically inept clients (that don't understand what a pixel is, let alone how you need to scale down pictures from your Canon camera before putting them on the web) is a huge time saver.

    17. Re: Can somebody mod down Dalilama's bullshit? by allo · · Score: 1

      sounds reasonable ;-). I like imagemagick as well, but not for calling by scripts in most cases. php/perl libgd has some disadvantages, though. I like python's pillow.

  14. Am I wrong, or is Await/Async still missing? by MonkeySpaceCapsule · · Score: 1

    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.

    1. Re:Am I wrong, or is Await/Async still missing? by Tony+Isaac · · Score: 1

      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 background operation. This makes the code much harder to debug, and often causes execution to be LESS efficient than it would have been with simple, single-threaded procedures. I dread the day JavaScript adds async/await.

    2. Re:Am I wrong, or is Await/Async still missing? by Anonymous Coward · · Score: 0

      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 background operation. This makes the code much harder to debug, and often causes execution to be LESS efficient than it would have been with simple, single-threaded procedures. I dread the day JavaScript adds async/await.

      The JS async/await is completely different from the one in C#, you can not compare them at all.

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

  16. The same can be said of many things by Anonymous Coward · · Score: 0

    Lots of knowledgeable people hate or dislike cockroaches. But cockroaches have succeeded in spite of them. What did these "knowledgeable" people miss when evaluating cockroaches?

    Lots of knowledgeable people hate or dislike Donald Trump. But Donald Trump has succeeded in spite of them. What did these "knowledgeable" people miss when evaluating Donald Trump?

    Generally speaking, when people decide they hate or dislike something, they are speaking for themselves. You can dislike cockroaches even if you're aware of their reproductive success, and you can dislike Donald Trump even if you're aware that he appeals to a lot of voters. Disliking something is not the same as predicting that it will go away of its own accord.

  17. What do we do then? by jon3k · · Score: 0

    We all agree we hate Javascript. So why aren't there any alternative scripting languages in the browser yet?

    1. Re:What do we do then? by tepples · · Score: 1

      Would you have preferred VBScript?

    2. Re:What do we do then? by jon3k · · Score: 1

      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.

  18. That's ES7 by bigsexyjoe · · Score: 1

    Yeah, you have to wait, that is ES7.

  19. JS is available by Anonymous Coward · · Score: 0

    1. Rise of Web
    2. Browser as a platform

  20. LOL by Anonymous Coward · · Score: 0

    lol fuckn hil;arious

  21. die JS! Welcome brython! by aod7br · · Score: 1

    Kill JS and put python in the browser: http://www.brython.info/

    1. Re:die JS! Welcome brython! by Anonymous Coward · · Score: 0

      > Kill JS and put python in the browser

      Oh, God, please, no!!

      Python's not a great language. The only reason it's successful is because of the huge support community, which would be useless for Python web apps.