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

88 of 165 comments (clear)

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

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

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

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

    1. Re:hated language becomes a success by Anonymous Coward · · Score: 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.

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

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

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

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

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

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

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

    9. 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.
    10. 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?
    11. 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.

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

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

    16. 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
    17. 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
    18. 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.

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

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

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

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

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

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


    It's just that easy!

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

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

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

      Thank God for unit tests

      Handy when static analysis is all but impossible.

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

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

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

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

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

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

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

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

    1. Re:But JavaScript isn't a success. by 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
    2. 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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Work was boring.

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

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

  16. 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...
  17. 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?
  18. 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.
  19. 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.
  20. 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."
  21. 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.

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

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

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

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

    Yeah, you have to wait, that is ES7.

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

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

    Would you have preferred VBScript?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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