Live data from Hacker News

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

news.ycombinator.com

71–80 of 303 posts

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

#71
post #47
post #29

Earlier quoted context omitted.

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…

You seem to assume that A) Types are low level B) C++ and C are the only competition to JavaScript C) Not having to worry about types makes you faster or in any way better A) is simply refuted by looking at java or SQL. SQL is a very high-level language compared to other stuff, yet it's heavily typed simply to ensure that data is either valid or the query fails (SQL Injection is still valid data in this case) B) Take…

> without having to think about threads or synchronization. Just pipe data through the channel!

I mostly agree with what you're saying, but note having a channel doesn't mean one stops worrying about synchronization. If two goroutines both started waiting for data from a channel they'd be deadlocked.

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

#72
post #65

Earlier quoted context omitted.

Dude, comeon. The browser has evolved a lot as a platform, as has the hardware power of computers running them. Maybe we're re-writing computer history, but if that's the case then it's because we have to migrate everything to javascript and the wiser old timers want nothing to do with it. * Do you really want to write CSS without a pre-processor? * Do you really want to control a webpage's state without JS models in…

> we have to migrate everything to javascript Why? What I really want is the whole browser to go away.

Okay. I guess you're welcome to do that? We browser coders will just continue to go to market faster. It's pretty cool that, if you put your work in, you can make a GUI on the browser that is accessible to all desktops and phones. That's 2 billion users.

The obvious question is: what would you replace it with? Do you want to replace it all with native apps? Or do you think that this whole internet thing is overrated?

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

#73
post #47
post #29

Earlier quoted context omitted.

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…

You seem to assume that A) Types are low level B) C++ and C are the only competition to JavaScript C) Not having to worry about types makes you faster or in any way better A) is simply refuted by looking at java or SQL. SQL is a very high-level language compared to other stuff, yet it's heavily typed simply to ensure that data is either valid or the query fails (SQL Injection is still valid data in this case) B) Take…

SQL is also a leaky abstraction, it would be much more simple if the database could just take any value and store it optimally. But at least you do not have to write:

  SELECT *string* foo, *string* bar FROM banana A INNER JOIN beer B ON *int* B.id = *int* A.id
I want to correct myself though. In ES6 you can now go very low level and deal with raw bit buffers.

My problem with Go and other languages is that you have to be verbose like str = string = "string"; Where the compiler could probably figure out it's a string because of the quotes. And use a default numeric type when dealing with numbers. A compiled language also has the advantage that the compiler can thoroughly analyze the program, optimize and chose the optimal types if they are not explicitly set. My biggest issue though is the inferior module system compared to NodeJS (commonJS) module system that makes it possible to not write complexed code, because it's lexically scoped and do not have hidden globals.

I'm aware that an imperative low level language that can talk directly to the hardware will beat NodeJS and JavaScript in performance. But for the most part I'm willing to sacrifice that for increased productivity and simplicity. What do you think about languages that compile to JavaScript ? And do you think adding types to JavaScript would make it more simple ?

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

#74
post #64

Earlier quoted context omitted.

Dude, comeon. The browser has evolved a lot as a platform, as has the hardware power of computers running them. Maybe we're re-writing computer history, but if that's the case then it's because we have to migrate everything to javascript and the wiser old timers want nothing to do with it. * Do you really want to write CSS without a pre-processor? * Do you really want to control a webpage's state without JS models in…

> Do you really want to write CSS without a pre-processor? Not him, but yes, I absolutely do. Pre-processors mainly have the effect of forcing you to have a build tool workflow, and the nice thing about web design is that you don't need stuff like that.

They were rhetorical questions anyway :) But you're right, I get away without preprocessors when I'm doing very small projects. And a year ago my team had a 20-second SASS compilation step, that was painful. I guess I couldn't do without it because of things like: variables, nested rules, vendor prefixes, and mixins. I use a lot of mixins in scss and I feel like my code becomes more modular because of it.

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

#75
post #65

Earlier quoted context omitted.

Dude, comeon. The browser has evolved a lot as a platform, as has the hardware power of computers running them. Maybe we're re-writing computer history, but if that's the case then it's because we have to migrate everything to javascript and the wiser old timers want nothing to do with it. * Do you really want to write CSS without a pre-processor? * Do you really want to control a webpage's state without JS models in…

> we have to migrate everything to javascript Why? What I really want is the whole browser to go away.

You do remember that Windows is the dominant os for end users? Almost all ui's would have to be created for Windows, and possibly for the other operating systems also. That's probably a lot of extra work.

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

#76
post #65

Earlier quoted context omitted.

> we have to migrate everything to javascript Why? What I really want is the whole browser to go away.

Okay. I guess you're welcome to do that? We browser coders will just continue to go to market faster. It's pretty cool that, if you put your work in, you can make a GUI on the browser that is accessible to all desktops and phones. That's 2 billion users. The obvious question is: what would you replace it with? Do you want to replace it all with native apps? Or do you think that this whole internet thing is overrated?

He probably agrees with this http://web.archive.org/web/20120509105723/http://teddziuba.c...

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

#77
I think it's due to the new version of Javascript being released recently after years of stagnation. ES4 was abandoned and ES5 was mainly standardising existing practices, while ES6 has added a lot more - new syntax, new types, iterators, generators, modules and so on.

A lot of the churn going on is due to people trying to work out the best way to use these new features, along with whether or not to keep backwards-compatibility with existing frameworks and libraries.

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

#78

Earlier quoted context omitted.

To a large extent this is true because the javascript community is busy with the re-invention of all of computer history, only without applying all of the lessons learned. Activity does not equate quality.

Not only are they doing that, but they are insanely arrogant about rejecting criticism that they're doing this too.

You just summed up "the largest, most active open source community that has ever existed" with "they" and suggested that "they" are all thinking the same thing with one mind.

That seems like a bit of a reach.

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

#79

To piggyback here: How long until we can just use whatever language we like, including Std.-Libs, package ecosystem, sandboxed FS (and thus DB support) and JIT it to JS in all commonly used Browsers?

See WebAssembly

Can't wait, I may actually switch to front end development when there are WA backend(s) for a language/languages I like.

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

#80
post #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?

Quite a few, if you browse the JavaScript pages on MDN you can read about them. Many of them inspired ES5 and later standardization work. Getters and setters, let and const, generators.
Post reply on HN