Guys, does V8 still deoptimize on ES6 features? For example, would using say const/lets in a function prevent V8 from optimizing it as a whole? That was the case some time ago when these features were still under a flag.
Node v4.0.0
221–230 of 277 posts
Re: Node v4.0.0
#222Earlier quoted context omitted.
Now that we have ES6 generators, this is much less of an issue.
Generators don't help with the sync/async split. Generators are just iterators, and are synchronous. The consumer asks for a value with next() and the value must be computable (even if that value is a Promise). If you have an async function (one that returns a Promise or in the future a Stream), and you need to call it from a sync function, and somehow incorporate the future value into the return value of the sync fu…
As for "having to change an entire call stack", that just stopped happening after a while. The rule of thumb was that if the function is impure (e.g. relying on mutable state) then it will likely become async, too. That lets me plan ahead.
Re: Node v4.0.0
#223Re: Node v4.0.0
#224Earlier quoted context omitted.
It promises a stable future, so let's say I'm being cautiously optimistic.
> It promises a stable future, so let's say I'm being cautiously optimistic. This doesn't make sense in light of your initial comment. One of the big goals of IO was to move to semver and address unpredictability/instability that you describe. If anything, the merging of Node and IO should give you confidence that project governance will be on the right track moving forward. Also, when you consider the advancements i…
Re: Node v4.0.0
#225Earlier quoted context omitted.
I mean, Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment, and a lot of complications needed (and in some cases, still need) to be sorted out. As for no recommend approach - that's deliberate. I don't think most people working on Node want a R…
> I don't think most people working on Node want a Rails equivalent It wouldn't really be possible anyway. Async programming is hard and the shortcuts one can take with synchronous Ruby are impossible with Async Javascript. Nodejs has a "fibers" lib though , but it doesn't look like it is widely popular, but AFAIK it is the only to truly abstract async programming.
Re: Node v4.0.0
#226Guys, does V8 still deoptimize on ES6 features? For example, would using say const/lets in a function prevent V8 from optimizing it as a whole? That was the case some time ago when these features were still under a flag.
Can I ask for a link on that? Thanks!
Otherwise the fact that engines bailout on optimizing ES6 features was kind of common knowledge when engines started to implement them.
Re: Node v4.0.0
#227Earlier quoted context omitted.
I mean, Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment, and a lot of complications needed (and in some cases, still need) to be sorted out. As for no recommend approach - that's deliberate. I don't think most people working on Node want a R…
> ... Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment... Actually, no, it didn't. JavaScript was first introduced "on the server side" about 20 years ago in the Netscape web server[1]. We learn from history that we learn nothing from history…
Re: Node v4.0.0
#228Earlier quoted context omitted.
I mean, Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment, and a lot of complications needed (and in some cases, still need) to be sorted out. As for no recommend approach - that's deliberate. I don't think most people working on Node want a R…
> ... Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment... Actually, no, it didn't. JavaScript was first introduced "on the server side" about 20 years ago in the Netscape web server[1]. We learn from history that we learn nothing from history…
This has nothing to do with the parent comment about node deliberately differing from rails, it's typical hn/reddit pedantry.
Re: Node v4.0.0
#229Earlier quoted context omitted.
> ... Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment... Actually, no, it didn't. JavaScript was first introduced "on the server side" about 20 years ago in the Netscape web server[1]. We learn from history that we learn nothing from history…
How long have you been waiting to use this pedantic comment and the obnoxious condescending quote about it to prove someone wrong and make yourself feel smart? This has nothing to do with the parent comment about node deliberately differing from rails, it's typical hn/reddit pedantry.
Re: Node v4.0.0
#230Earlier quoted context omitted.
nvm install 4.0 works, do we really need the "v"?
Since it's the first and only release so far in 4.x.y, I got away with `nvm install 4`. ;)
> nvm install stable
v4.0.0 is already installed.
Now using node v4.0.0 (npm v2.14.2)