What does HackerNews think of proposals?

Tracking ECMAScript Proposals

#10 in JavaScript
but RFCs are written using "git".

https://www.ietf.org/rfcdiff?url1=draft-ietf-tcpm-rfc793bis-...

sure, maybe IETF uses their homegrown version, but - for example - TC39 uses GitHub https://github.com/tc39/ (here are the proposals for JS https://github.com/tc39/proposals ), whatWG also uses GH https://github.com/whatwg/html

The working group most in charge of JS is ECMA's TC-39 (TC => Technical Committee) [0]. They've been taking a very deliberate, slow path to expanding the "standard" library because they take a very serious view of backwards compatibility on the web. Some proposals were shifted because of conflicts with ancient versions of things like MooTools still out in the wild, for instance. (This was the so-called "Smooshgate" incident [1].)

This may speed up a bit if the Built-In Modules proposal [2] passes, which would add a deliberate `import` URL for standard modules which would give a cleaner expansion point for new standard libraries over adding more global variables or further expanding the base prototypes (Object.prototype, Array.prototype, etc) in ways that increasingly likely have backwards compatibility issues.

TC-39 works all of their proposals in the open on Github [3] and it can be a fascinating process to watch if you are interested in the language's future direction.

[0] https://tc39.es/

[1] https://developers.google.com/web/updates/2018/03/smooshgate

[2] https://github.com/tc39/proposal-built-in-modules

[3] https://github.com/tc39/proposals

My biggest pointer would be to remember that Java & JavaScript aren't named that way by coincidence. They're two different approaches to a similar problem. Java suffers from Enterprise Development (eg: Enterprise FizzBuzz[0]), JavaScript suffers from Ultimate Accessibility (eg: how many questions on Stack Overflow conflated jQuery and JS?).

> How should exceptions be managed? [...] Has there been a debate about best practice? Where can I find it?

I suggest you handle the errors you can and otherwise let it crash.[1][2] Debates in NodeJS-land have steered towards more monadic/Result-like structures and working synchronous-looking try/catch onto async/await. NodeJS and its various components are open source, you'll have a lot of luck looking around on GH for issues & PRs related to a feature -- same for the language, ECMAScript[3] officially.[4]

Since you mentioned Clojure, have you looked at ClojureScript?[5] That may be a good entry to JS authors & articles you'd enjoy.

> I have the impression that NodeJS is a bit more magical than the JVM [...] Is that correct? Where are good resources on this subject?

As other replies have mentioned, you're really talking about V8[6] for the "JSVM" executing that code. A thing I've seen throw some people for a loop is how minimalist the specification actually is.[7] The magic in NodeJS is certainly from V8 and the rate of optimizations there but also libuv,[8] what actually powers the infamous event loop.

Hope that helps!

[0]: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

[1]: Borrowing from Erlang, see Making reliable distributed systems in the presence of software errors, Joe Armstrong, page 104 "Error Handling Philosophy" https://erlang.org/download/armstrong_thesis_2003.pdf

[2]: _Most_ kinds of errors will cause the process to crash if you don't handle them, https://nodejs.org/dist/latest-v16.x/docs/api/errors.html . Promise rejections don't (yet) though it will log a warning, and callback-based APIs will always consist of an [error, data] tuple for the arguments

[3]: https://github.com/tc39/proposals

[4]: Because Oracle owns the trademark, of course: http://tarr.uspto.gov/servlet/tarr?regser=serial&entry=75026...

[5]: https://clojurescript.org/

[6]: https://v8.dev/docs

[7]: "ECMAScript as defined here is not intended to be computationally self-sufficient; indeed, there are no provisions in this specification for input of external data or output of computed results. Instead, it is expected that the computational environment of an ECMAScript program will provide not only the objects and other facilities described in this specification but also certain environment-specific objects, whose description and behaviour are beyond the scope of this specification except to indicate that they may provide certain properties that can be accessed and certain functions that can be called from an ECMAScript program." https://tc39.es/ecma262/#sec-overview

[8]: https://github.com/libuv/libuv

These features are copied from TC39 proposals for JavaScript. Presumably they were deemed safe to add to TS now that they have reached Stage 3 as JS proposals.

https://github.com/tc39/proposals

After several years of stagnation, ES6[1] massively improved the language, and there is a pipeline of more proposals[2].

[1]: http://es6-features.org/

[2]: https://github.com/tc39/proposals

Just in case anyone is not aware there is a stage 3 proposal [1] for 64 bit integers right now called BigInt [2].

[1]: https://github.com/tc39/proposals

[2]: https://github.com/tc39/proposal-bigint

No. There's still lots of ongoing work. There's a repo [0] with proposals and the different stages they're in.

Why would WASM mean slowing down JS changes?

[0] https://github.com/tc39/proposals

I couldn’t immediately see any proposals for list/set/object comprehensions at https://github.com/tc39/proposals, are there any?
That one's a lot closer to being finalized. Object Rest/Spread is currently at Stage 3, and is already implemented in Chrome/V8.

For reference on proposal status and details, see https://github.com/tc39/proposals .

The TC39 process isn't perfect, but it's definitely much better than what it used to be. Particularly, the effort to bring discussions into light and provide the ability to engage in the development of the various proposals[1] has – I believe – really improved the state of affairs. Mailing lists are a terrible format for this I think. A clear definition of the stages[2] also doesn't hurt. Recently, a decision was made to ensure all stage 1 proposals (i.e. anything above strawmen) are migrated to the TC39 repo[3], which is I think a good example of how the process is incrementally improved. This is easily the kind of thing that could've been discussed and decided upon behind closed doors, but instead it's in the open for anyone to read and get involved. Kudos.

Unfortunately, the same can't necessarily be said for the other bodies. WHATWG for instance may put things online and discuss things in the open, but unless you're an editor or one of the blessed few I get the distinct feeling that your contributions are more of a nuisance than anything else, making the whole thing look like process theatre to me. I may well be wrong, but that's my impression. (Note: I haven't been personally affected by this, it's just my impression from reading the discussion on various WHATWG specs.)

[1]: https://github.com/tc39/proposals

[2]: https://tc39.github.io/process-document

[3]: https://github.com/tc39/proposals/issues/44

Looks to be a stage 3 proposal[1] so that seems likely. Had a quick read through, looks like a pretty solid proposal. If I read it correctly, it means `import()` will only load ES2015 modules. (I.e. the result of HostResolveImportedModule is a Module Record. That's a good thing as far as I'm concerned.

Given the history of discussion around this, this seems surprisingly low key and reasonable. (The System.loader stuff was gnarly!)

But what does this mean for nodejs? I don't see how this rhymes with current proposals re `require.import` and the likes. If the above proposal wins out it becomes a language spec, so presumably will also become available in nodejs, and if they go ahead with the ideas mentioned in another comment here, we'd have both `import(specifier)` and `require.import(specifier)` – seems pretty confusing, but maybe I'm getting it all wrong?

[1]: https://github.com/tc39/proposals

> The last 2 ECMA releases (2017 and 2016) have felt pretty dull honestly.

It’s not exactly surprising. ES6 came out almost 6 years after ES5, so there was quite a few changes then. The yearly release cycle was always going to mean fewer features being standardised each release.

While I do follow from a distance some of the work TC39 does, I can only assume that most people involved have realised that having an orderly process for feature proposals - and not trying to rush heaps of features into a single release - is a much better way to do things.

> With the language moving this slow compared to faster releasing languages like Python, Elixir, and Go

Python, Elixir and Go have the advantage that they have one main/reference implementation and can break backwards compatibility whenever they want (although that hasn’t gone brilliantly for Python) by just incrementing a version number. ECMAScript runtimes have to be able to run programs that were written almost two decades ago - backwards compatibility can’t be broken - and you have several major implementations (V8, Spidermonkey, etc.) to deal with.

The tail call feature from ES6 is already being revisited because it caused problems [0].

> I wonder if Node.js will start to see a decline in hype since the language hasn't improved much in the last 2 years.

Tools like Babel mean that people who really want to use new or experimental language features can do so. There are dozens of language features in the proposals pipeline [1] and many (if not a majority) can be used via a compiler like Babel or via a polyfill.

Node.js also has the advantages of having it’s own 'standard library’ and an enormous package ecosystem to use. I think it will be fine.

[0] https://github.com/tc39/proposal-ptc-syntax [1] https://github.com/tc39/proposals

Unfortunately, async and await didn't make it into ES7. ES2016 (ES7) was finalized with Array.prototype.includes and the exponentiation operator [0]. We'll have to wait for ES2017 at the earliest for async/await to make it into the official spec [1][2].

[0] http://www.ecma-international.org/ecma-262/7.0/ [1] https://github.com/tc39/proposals [2] http://www.2ality.com/2016/02/ecmascript-2017.html

There are only 2 features this year, and decorators are only a stage 1 proposal, so not likely next year either.

https://github.com/tc39/proposals