Live data from Hacker News

Ask HN: Why is everything in JavaScript changing so fast?

news.ycombinator.com

21–30 of 303 posts

Re: Ask HN: Why is everything in JavaScript changing so fast?

#21

Earlier quoted context omitted.

Mind sharing why you consider node.js and other server-side javascript tools irrational?

For APIs the lack of typing hurts; only that is now no argument because it is fixed by TypeScript / Babel. Performance? That is a good reason, but again if you actually pay attention to defining (and testing) your APIs that is in most cases a solved problem - use a fast language for performance sensitive endpoints. Team's lack of knowledge? That's the only real argument. But that works both ways. If you have a team o…

I would not call TypeScript/Babel making it a non-argument, because those two are separate languages that are compiled to Javascript. The language itself still has those limitations, you're just hiding it under the rug.

Regarding performance, your solution means that in order to understand your site, you need to understand another language and javascript now. At which point, why swap between languages and mindsets when the other language can already do everything javascript does, plus gives you a performance edge?

With the knowledge pool, it really does depend on the sort of application you're making, and how much code is reused and where. If your application has a web-based, and desktop/mobile app, you may very well be better off coding the entire thing in a language more amenable to native compilation.

Knowledge-wise, and long-term developer comfort-wise, Javascript's fast churn is problematic. When big packages' idea of long-term support is three years or less, you're going to be spending a lot of engineering time rewriting your code just to keep things from collapsing into a bug-ridden insecure heap. Examples like Angular.JS show just how brittle the javascript environment is, and how difficult it's going to be to keep a site maintained.

Re: Ask HN: Why is everything in JavaScript changing so fast?

#22
JavaScript is a programming language that was frozen in amber for a decade, and is only now starting to thaw.

Brendan Eich initially designed JavaScript in an infamously short time--he coded and designed the first prototype of JS in just 10 days.

It quickly became the only programming language you can use in a web browser, with multiple vendors, including Microsoft, owning mostly compatible implementations. Due to trademark disputes they couldn't even call the language standard "JavaScript," so the language standard is called "ECMAScript."

Microsoft didn't want/need JavaScript to change or grow at all. Once Internet Explorer 6 became the dominant browser on Windows, (which was and still is the dominant PC operating system,) they stopped releasing new major versions of IE for five years (2001-2006), and IE7 wasn't a very big upgrade, especially in terms of JS language features.

Mozilla unilaterally released new language features that only worked on Firefox, so nobody could use those language features in practice on the web; in many cases, new language features wouldn't even parse in IE.

In 2007, there was an attempt to build a major new JavaScript version (ECMAScript 4) with a ton of new features, (classes, a module system, optional static typing, algebraic data types) but it was scrapped due to disagreements between Mozilla and Microsoft. They wound up implementing a much more modest upgrade (ECMAScript 5) which shipped in IE9.

In all this time, there was essentially no interest in running JavaScript in command-line tools or on the server side. That changed in a big way in 2009 with Node.js. It used V8, Google's JIT engine for JS, and it was surprisingly fast.

This is when the language really started to unthaw. IE declined in dominance as Chrome rose, and the demands of server-side development started to be felt more strongly in the JS community.

ECMAScript 6 started to add back in a number of cool features, and by this time, JS developers were desperate to use them. This lead to the development of "6to5," (now called "Babel") which allowed you to write code in ES6 and "transpile" it into older JavaScript versions, so developers could experiment with new language ideas without pushing them through the standardization process.

Languange evolution kicked into high gear at that point. There are a bunch of interesting pluggable transpilers out there, including TypeScript, JSX, and Flow, and countless non-standard plugins for Babel.

And that's just the language itself! The "standard library" for JavaScript for years was just "whatever IE6 could do" and that wasn't very much. IE6 was pretty buggy as well. jQuery became popular as a library to smoothe over differences between browsers, but mostly to work around bugs in IE.

Client-side frameworks were tough to implement on IE6, not least because IE6 was just so darn slow. As newer, faster browsers came out, it became possible to trade off some performance to improve developer productivity.

And everybody has their own ideas about what those trade-offs might be like!

At the same time as IE6 started to decline in popularity, the mobile web on iPhone and Android rose in importance. Smartphones include a bunch of new sensors (GPS, orientation, camera) and new limitations (RAM, slow/unreliable network). This spurred on browser vendors to "compete with native apps," adding features to the browser platform, inviting developers to respond to these with new frameworks.

As for the JS server-side, Node.js is still a relatively young platform as these things go, and so it's not surprising to see a lot of churn in server-side libraries/frameworks, especially given how much churn the language itself is undergoing.

Node.js is also the first major platform to be born in github, which IMO encourages experimentation (and flame wars) via forking.

Node.js's standard library is designed to be small, (they call it the "core" and resist Python's "batteries included" philosophy,) forcing folks to rely on libraries and frameworks to keep the lights on. Even most libraries themselves need to take dependencies on other libraries, because of this "small core" philosophy.

I think it's going to be at least a few more years before things start to cool off a bit. Enjoy the ride, if you can!

Re: Ask HN: Why is everything in JavaScript changing so fast?

#23
In an industry without a guild / license / what have you, the incentives skew towards articles of proof. Articles of proof could be demo websites, screen shots, and open source libraries.

Being the creator or top two contributor of a library is now worth so much more than being a small time contributor that the incentives are skewed towards everyone just making a new thing, always.

It's their way to stand out.

So why is this more prevalent in JavaScript? Front end inherently has more new comers. Long time hackers or cs grads feel less of a need to prove themselves making free software?

I think it's natural that the web programmers would understand web self promotion better than other languages. Guess who's better at Twitter? The js people! Why? They were writing the web to begin with!

I wish it would stop. Our qa engineer is writing web driver tests in JavaScript and I don't understand why! There's nothing about testing that NEEDS to be async! The python API would likely be no slower and much easier to write and debug.

Sane defaults are an important part of tech, and default async is a terrible setting. Python sync is easier, and Go routine concurrency is easier. Always on async just seems like a terrible default. For speed I'd do Go, and for all else Python.

Re: Ask HN: Why is everything in JavaScript changing so fast?

#24
Is it because it lacks a shepherd?

Perl has Larry Wall. Python has Guido van Rossum. PHP had Rasmus Lerdorf and later Andi Gutmans and Zeev Suraski (Zend). Ruby has Yukihiro Matsumoto, and Rails has David Heinemeier Hansson. JavaScript came from Brendan Eich, but it was like a work for hire, wasn't it? Microsoft and Netscape just kind of ran with it.

Then I guess it did have a shepherd, the W3, and all the browsers followed its standard, except the one that had 90% of the market. At long last, in the past few years, market share has passed to companies that are much more willing to follow open standards.

But at the same time, the user base is huge, a churning mass of millions of programmers of every level of ability, and each one of them can now publish their framework on Github. Plus there are several large web companies that are competing with each other.

Thankfully at least the language itself has a single standards track. Cross-browser agreement isn't perfect, but it's much better than it used to be. It's just that we don't have a standard library, like Perl's CPAN. Instead we have NPM.

I wasn't paying enough attention when Perl and these other languages developed, so I don't know for sure why they're different, or even if they were that different at this stage. Even they have their different web frameworks to this day.

Re: Ask HN: Why is everything in JavaScript changing so fast?

#25
post #16

The open-source-JavaScript community right now is just the largest, most active open source community that has ever existed. Check out the stats that GitHub recently announced: https://octoverse.github.com/ Open source JavaScript activity as measured by pull requests has doubled (!!) in the past year. It's more than the next two languages (Java and Python) combined. Most of the top repositories on GitHub are JavaScri…

[deleted]

Re: Ask HN: Why is everything in JavaScript changing so fast?

#26
The perceived benefit of creating a new framework is large (I'll solve programming the internet!) and the cost is quite small (easy to write js with little knowledge), there's a huge number of devs, and no one really owns the space.

Compare it to say, creating a new operating system. Sure the world could benefit from a better OS, so why not make one? The perceived benefit is small (why do this when Linux exists) and the cost is large (it's hard and you need a lot of knowledge).

Also a lot of half baked ideas. The number of js writers is huge but on average very inexperienced compared to other languages.

Re: Ask HN: Why is everything in JavaScript changing so fast?

#27

JavaScript is a programming language that was frozen in amber for a decade, and is only now starting to thaw. Brendan Eich initially designed JavaScript in an infamously short time--he coded and designed the first prototype of JS in just 10 days. It quickly became the only programming language you can use in a web browser, with multiple vendors, including Microsoft, owning mostly compatible implementations. Due to tr…

What language features only worked on Firefox?

Re: Ask HN: Why is everything in JavaScript changing so fast?

#28
Cause JavaScript is used in browsers so it is the language of the web, and because it has turned out to be incredibly flexible and adaptable, and because it's pretty simple once yo get past the async thing, and because alot of effort has gone into making it fast.

Re: Ask HN: Why is everything in JavaScript changing so fast?

#29
post #13

Earlier quoted context omitted.

Mind sharing why you consider node.js and other server-side javascript tools irrational?

Unless your project is small (like under 10-20k lines), why use node when you can use a typed language? Javascript is a mess and if I'm server side and using something dynamic, I might as well use something nicer like ruby or python.

Types are low level. JavaScript is very high on the stack, and has no concept of types, it only has "value objects" (variable values: string and number, plus static values: true, false, null, undefined) and "normal objects" (Array, Object, Date, Function, etc). There's a debate though on what type should be used for numeric values in JavaScript. In JavaScript you rarely see getters and setters, as you do not need any abstraction over the type system, although it is possible to do bitwise operations, so if you want to you could make your own types, although you will not have full control of their binary representation, witch you would need a "real" programming language with a proper type system, but I've only seen that in optimization witch rarely runs faster then native JS. You get a lot of productivity by not having to worry about types in JS, and you rarely se buffer overflows witch is common in lower level languages such as C and C++. JavaScript is an an abstraction where you do not have to worry about the under-layer like imperative memory management. If you have to decide between small int vs big int vs floats, it's a leaky abstraction. JavaScript is one level above that.

Re: Ask HN: Why is everything in JavaScript changing so fast?

#30

In an industry without a guild / license / what have you, the incentives skew towards articles of proof. Articles of proof could be demo websites, screen shots, and open source libraries. Being the creator or top two contributor of a library is now worth so much more than being a small time contributor that the incentives are skewed towards everyone just making a new thing, always. It's their way to stand out. So why…

Just a minor off topic correction, since you made the mistake twice: "squeue" is actually "skew".
Post reply on HN