Live data from Hacker News

Node.js is able to execute TypeScript files without additional configuration

nodejs.org

271–275 of 275 posts

Re: Node.js is able to execute TypeScript files without additional configuration

#271
post #18

Earlier quoted context omitted.

What are the recent improvements in node itself? Last actually note-worthy improvement I heard of was properly supporting import/export (although do you still need to use the .mjs hack?), but I've been out of the loop here for sometime so would be nice to know what they've added since.

Small but lovely addition for me is the ability to load .env files natively. There’s more like this; small, focused, real-world-improving features.

[dead]

Re: Node.js is able to execute TypeScript files without additional configuration

#272

Earlier quoted context omitted.

Package and environment management are both pretty commonly brought up.

I work with Node every day, and the library ecosystem is a nightmare. Just keeping a project from falling apart takes a huge amount of effort. Libraries are either abandoned when the author moves on, or they push major releases almost every month. And there’s a new CVE practically every week. Python libraries are much more stable and reliable.

I work with both node and python. I agree with you on node, it is a dependency disaster. But regarding python the problem is not with the libraries themselves but in the circus of pip vs conda vs poetry vs pipenv vs uv vs ...

Basically this: https://xkcd.com/1987/

Re: Node.js is able to execute TypeScript files without additional configuration

#274

Earlier quoted context omitted.

Package and environment management are both pretty commonly brought up.

I work with Node every day, and the library ecosystem is a nightmare. Just keeping a project from falling apart takes a huge amount of effort. Libraries are either abandoned when the author moves on, or they push major releases almost every month. And there’s a new CVE practically every week. Python libraries are much more stable and reliable.

and you dont even need libs for most stuff as the language comes with batteries included. asyncio is a good example

Re: Node.js is able to execute TypeScript files without additional configuration

#275
post #25

Earlier quoted context omitted.

This has nothing to do with the "node world". Such an enormous feature would have to go into ECMAScript. Which is very, very unlikely to ever happen, they may as well design a new language. All those runtimes implement that spec. Expecting them to write an extremely complex new feature that is easily more complicated than everything already implemented (especially with backwards compatibility, and given that the lang…

ECMAScript community is actually dipping their toes in the water of adding typing to the spec, and it's at Stage 1: https://github.com/tc39/proposal-type-annotations . Now of course, this would only add type syntax to the language, not true processing: there's nothing in the spec about actually handling them. Still, it's a step in that direction, so I wouldn't say "very unlikely to ever happen" ... "still a long ways…

How is type annotation syntax a "step in that direction" of making an entirely new language??? They merely standardize on what is already there.
Post reply on HN