Live data from Hacker News

Node.js 5.0 Released

github.com

31–40 of 132 posts

Re: Node.js 5.0 Released

#31

I found this out last night at 3am after rushing to provision a server. i don't have a great handle on semver or dev cycles, point ceded, but they released 4.2 on october 12th. thats like .1 every 2 days.

The major version number change doesn't mean a ton of work was done, just that there were breaking changes.

Re: Node.js 5.0 Released

#32
post #20

Earlier quoted context omitted.

JS in general moves fast and packages range from great to WTF in quality. I would suggest using Babel(or something similar) for all future JS development. That way you can use ES2015/2016 features now and have them work in most environments. I have a built a small API using express and passport and so far these node changes have not impacted my code. Another option for fast API development is Java 8 with SpringBoot a…

But then you have to keep up with Babel changes too... http://babeljs.io/blog/2015/10/29/6.0.0/

Why this urge to keep up to the latest and greatest? Especially for a transpiler? If it is converting your code just fine, why update?

Re: Node.js 5.0 Released

#33
post #7

I recently looked at using Node for a simple API backend. ES6 seems like it's not there yet, the stability of Node makes me wary. Constant changes seem exhausting to keep up with. For a simple microservice api you don't want to be upgrading it every 3 days. The continuous change doesn't make sense to me. Trying to get up to speed on all the Node.js ecosystem feels exhausting, only to have it change a few weeks later.…

> I ended up opting for Flask and Python 3x instead

Yap good choice. Python to me is more readable (so I can understand my own code and others' better) and I find the echo system to be friendlier and more mature.

Re: Node.js 5.0 Released

#34
post #21
post #9

Uhh, wait, wasn't nodejs 4.0 only like a month ago? So are there going to be breaking changes every few months now?

Yeah, why not? Just because they upgrade node, doesn't mean you have to use that version. If you want a stable version, you'll be on the LTS release that will be supported for a long while

[deleted]

Re: Node.js 5.0 Released

#35
Good lord people...

1. There is no one forcing you to upgrade, 4.2 is LTS, you've got 2yrs+

2. 5.0 followed 4.0 so closely because 4.0 was the iojs/node merge and 5.0 was to correspond with the new V8 release, future major bumps will be closer to 6mo (to match V8)

Re: Node.js 5.0 Released

#36
There's a lot of confusion and concern in here about the release of a new major version very soon after the release of another major version (v4.0.0 was released just a month and a half ago). Please note that this is a special release prompted largely by the odd timing of a new release of Google's V8 [1].

If you're looking for solid, long term stability, you are perfectly fine sticking with v4.0.0, as its marked an "LTS" release. This means it'll be actively receiving minor- and patch-level updates for 18 months, then for 12 months thereafter it'll get updates for severe bugs and security problems (what they call "maintenance" mode) [2].

[1] https://twitter.com/rvagg/status/659871982670884864 [2] https://medium.com/@nodesource/essential-steps-long-term-sup...

Re: Node.js 5.0 Released

#37

I found this out last night at 3am after rushing to provision a server. i don't have a great handle on semver or dev cycles, point ceded, but they released 4.2 on october 12th. thats like .1 every 2 days.

Semver versions aren't decimal numbers, the dot is a separator between categories with different semantics, not a break between tenths and integers.

Even non-semver version numbers are rarely decimal numbers, even though the major/minor distinction may be less clearly defined.

So talking about a 0.1 every n days inferred from the date of a 5.0 vs. A 4.2 release doesn't make any sense; if there were actual minor releases that frequently, it would, but that is a different thing.

Re: Node.js 5.0 Released

#38
post #30
post #16

Earlier quoted context omitted.

Yes, I'm very excited about the spread operator! I've been spoiled by Firefox.

Looking at documentation.. does this only work on lists (or list like object)? I.e. you can't "expand" a k:w object? Or is there another operator for this? Example: function foo(a=1, b=2, c=3) { return a * b * c;} dict = {'b': 4, 'c': 6}; foo(...dict);

Yes and no.

You can still do something like:

    foo(... Object.keys(dict).map(name => dict[name]))
(Maybe someday you might be able to use Object.values() to achieve the exact same thing without needing to use .map)

However, the spread operator doesn't match the argument names to the object names. So the above call would mean the following:

    foo(4, 6)
And not what you'd like:

    foo(undefined, 4, 6)
However, note that you can rest an object too:

    let x = { a : 1, b : 2, c : 3 };
    let { a, ... rest } = x;

    console.log( ... rest ); // { b : 2, c : 3 }

Re: Node.js 5.0 Released

#39
post #30
post #16

Earlier quoted context omitted.

Yes, I'm very excited about the spread operator! I've been spoiled by Firefox.

Looking at documentation.. does this only work on lists (or list like object)? I.e. you can't "expand" a k:w object? Or is there another operator for this? Example: function foo(a=1, b=2, c=3) { return a * b * c;} dict = {'b': 4, 'c': 6}; foo(...dict);

Technically, the spread operator works with iterables [1]. If you wanted to spread an object `obj`you'd need to define `obj[Symbol.iterator]` [2].

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re: Node.js 5.0 Released

#40

Earlier quoted context omitted.

But then you have to keep up with Babel changes too... http://babeljs.io/blog/2015/10/29/6.0.0/

Why this urge to keep up to the latest and greatest? Especially for a transpiler? If it is converting your code just fine, why update?

Probably the concern that waiting between updates means that if you are forced to update for some reason (critical bug or must-have feature) you have a tougher upgrade path.
Post reply on HN