8 ms·
Might be one of the saddest things I've read linked out of Hacker News. As developers we're doomed to a future of using a awful language because it happened to
by cognivore 12y ago
Might be one of the saddest things I've read linked out of Hacker News. As developers we're doomed to a future of using a awful language because it happened to be at the right place at the right time and was good enough. Now we're stuck with it. Reminds me of DOS.
- VieElm 12y agoEcmaScript 6 and 7 are actually adding beautiful language features. JavaScript is changing in a big way, a lot of new JavaScript will not even resemble the stuff you're probably referring to.
- angersock 12y agoBug not feature, unfortunately. Were only that effort spent on eradicating the old legacy libraries!
- flaki 12y agoIf you are saying this, you certainly didn't read the article (properly). You can not "eradicate old legacy libraries" on whim - this stuff is out there. It is used by software out there. Software that would break if things like that would be removed. You can't just rip out and change parts of it at whim. You have to work around problems - at least until they wane in popularity and slowly die out. Evolution, rather then revolution - as stated in the article. That is exactly what TC39 is doing when they are improving on the standard and JavaScript itself. Case in point: Array.prototype.values was a proposed feature - returning an iterator for the values in an array[1]. The feature was introduced and had to be backed out at least twice[2] because widely used web frameworks (in this case, Sencha) used the attribute "values" on arrays and webapps broke as the method was added to the Array prototype. And this wasn't the first case. [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [2]: https://esdiscuss.org/topic/array-prototype-values-breaks-the-web https://esdiscuss.org/topic/array-prototype-values-breaks-th...
- pluma 12y agoFucking Sencha.
- angersock 12y agoSo, that's the thing, right, despite all the downvotes above. We get to strongly push for new language features, or we get to strongly push for backwards compatibility. If we elect to do both blindly and without forethought, as the JS community seems to be doing (having learned from the C++, evidently), we are going to run into these things over and over again. And frankly, a lot of the legacy code and terrible hacks on the Web deserve to be broken, noticed, and remove/updated. Hacking prototypes (as Sencha did here) is something they shouldn't have done in the first place.
- tracker1 12y agoThe origins of this code come a bit before jQuery.. when libraries commonly extended existing structure prototypes... Some of those became the basis for the additional methods (map/reduce/filter etc) on Array, and others. JavaScript is very flexible which is a blessing and a curse. I've been a fan of JS since pretty early on... the DOM differences between IE and NN were really horrible to deal with in the v4 browser days, and until jQuery didn't start to get much better really, where today you really don't need jQuery. It's an evolution here... If you're willing to use transpilers you can go anywhere you like... from BabelJS to ClosureScript, TypeScript, CoffeeScript or others... you can get the style you like. npm + browserify (or webpack) have made developing modern web applications a dream compared to the past.
- Zelphyr 12y agoIsn't this the usual way technology proceeds? Betamax vs VHS, etc...
- cwyers 12y agoEveryone gets the wrong idea from the Betamax vs VHS thing. The correct lesson to learn is to actually solve the problems people have. VHS could record an entire football game on one tape. Betamax couldn't, because they prioritized video quality over recording length. They bet wrong; consumers prioritized recording length over video quality, because a mediocre picture of 100% of the thing they wanted to watch beat a better picture of 60% of the thing they wanted to watch. And yet everyone turns Beta vs VHS into a sob story about how the best doesn't always win, instead of figuring out the real lesson: know what your customers want and give it to them.
- zachrose 12y agoI thought the reason Betamax didn't succeed was that Sony required deals to release things on their format, and it turned out a lot of people wanted videocassettes for porn? (Same general idea though.)
- dismal2 12y agoWhat do you hate about javascript?
- samspot 12y agoIt has awful parts that should be avoided. Once you learn to avoid them you can have a great time. This isn't that different from most other languages. I think javascript has just been more heavily complained about. There is also an automatic look-down-your-nose tendency that most of us started with, including myself. Once I decided to learn more than the bare minimum I became very happy with it.
- Dewie 12y ago> This isn't that different from most other languages. Based on what people tend to complain about, some languages have more should-be-avoided parts than others. I guess no language is perfect... but that is so obvious that it doesn't need to be mentioned. Yeah, no language is perfect. But it's still interesting to see which ones are the least "perfect". I don't get this tendency to want to muddy the waters with appeals to "nothing is perfect". Nothing is perfect, but some things sure seem to suck 5 times or more than other things. (For that matter - it actually does seem like there are languages where you at least don't have to actively avoid parts of the language. Maybe they're not the best or currently the ones which are recommended, but it's not like people say that you should avoid them because they might trip you up in a weird way.)
- vkjv 12y agoI would far prefer a language that has parts that I need to avoid than one that is completely missing parts I really want.
- ufo 12y agoBut what features does JS have that no other language has, other than the ubiquity of the browser as a platform? JS has been mostly frozen ever since it was created in the mid 90s and you also don't have much to work with when it comes to the standard library.
- wtbob 12y ago> But what features does JS have that no other language has, other than the ubiquity of the browser as a platform? That's its only distinguishing or redeeming feature I can see. If you had a free hand to choose, would you ever want JavaScript?
- pharke 12y agoThere are only two kinds of languages: the ones people complain about and the ones nobody uses. --Bjarne Stroustrup [1] [1] A standard complaint deserves a standard response.
- timepiece 12y agoThe first js hater of the night :)
- edgyswingset 12y agoAs developers, we're blessed to be a part of a future where we can take a sometimes clunky language like JavaScript and improve it to incorporate elements of our favorite languages.
- Dewie 12y agoBecause if there is one thing we've learnt about programming languages, it is: throw enough features at a language and it gets transformed from bad to good.
- ufo 12y agoThat worked for C++, right? :)
- nostrademons 12y agoC++14 ain't half bad...
- weland 12y agoI mean, when it's so huge, there's bound to be some good parts in it, you just have to look for them a lot.
- lucian1900 12y agoIt most certainly did for C#.
- ufo 12y agoAt this point I'm just glad that the language we are stuck with is JS and not PHP.
- neuronic 12y agoIn some alternative universe Perl is the dominant web language along with HTML and inline styling.
- rpcope1 12y agoI'm going to release a Javascript framework and call it Brawndo.
- codingdave 12y ago"...happened to be at the right place at the right time and was good enough." Sounds like almost every successful startup, too. Starting out as just "good enough" is fine. Improvements will happen over time. It is short-sighted to look at where we are today and believe it to be the end of the story.
- jonpress 12y agoDevelopers who say that JavaScript is bad are ones who haven't seriously used it recently. Personally, I've come to prefer (by a long shot) JavaScript's prototype-based OO over traditional class-based OO. JavaScript is a great language with a dark past and it suffers from its legacy. I've programmed in C/C++, C#, Java, AVR assembly, PHP, ActionScript and Python among others and I would not hesitate to say that JavaScript is my favourite. Why are there so many NPM modules? - Because people who know JavaScript love it. I'm yet to see the same kind of passion in any other programming community. Yes, it has some gotchas, but so does every other language. When used correctly, function closures are awesome! REALLY awesome. I pity the poor, poor fools who misuse them and end up with callback hell. People mention 'callback hell' a lot, but no one talks about callback heaven.
- irascible 12y agoAgreed. I started using .js after 20 years of C/C++/Python/LUA/Java/AS/Etc.Etc. Javascript is fucking great.. especially in Chrome.
- kuschku 12y agoI used to complain about JS a lot, and from an OO standpoint it is annoying, but after I started getting more into functional programming, I started to like JS more and more. Although a shorter function syntax with default-return on everything would make it a lot nicer (and more similar to LISP).
- ardfard 12y agoYou could always use transpile to js language like CoffeeScript or ClojureScript for a nicer syntax. Combines it with build system like Gulp or Grunt really makes the experiences pretty painless.
- the_imp 12y agoIt sounds like you're describing ES6 arrow notation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- scelerat 12y agoI'll make no strong apology for JavaScript besides saying that compared to other "popular" languages I have had the opportunity to use professionally -- a list that includes perl, php, and vbscript -- JavaScript annoys me considerably less than many.