3 ms·
Deno wasn't originally designed to be node compatible, but I think they realized nobody would want to switch to it because node is so prevalent already...
by ehhthing 3y ago
Deno wasn't originally designed to be node compatible, but I think they realized nobody would want to switch to it because node is so prevalent already...
- tarruda 3y agoI think the main appeal of projects like Bun and Deno is the built-in tooling for building/bundling modern typescript applications without requiring dozens of dependencies for even a basic hello world app. If node.js decided to include functionality similar to what is available on Bun/Deno, both projects would probably lose traction quickly.
- incrudible 3y agoNot sure what modern typescript means, but you only need one or two dependendencies (esbuild and tsc) unless you are doing something more involved, in which case deno alone might not work either.
- vorticalbox 3y ago> If node.js decided to include functionality similar to what is available on Bun/Deno, both projects would probably lose traction quickly. I believe this too. The big appeal for me is not having to install typescript, eslint, jest AND then set up all the configs. deno has nice defaults, though the importing via URLS and browser compatible API do make deno very tempting
- pjmlp 3y agoExcept they are playing catch up with what Microsoft says Typescript is supposed to mean. I rather have pure JavaScript, or use the Typescript from source, without having to figure out if a type analysis bug is from me, or the tool that is catching up to Typescript vlatest.
- whstl 3y ago> without having to figure out if a type analysis bug is from me, or the tool Deno uses regular Typescript for static type checking, it's just built-in. Bun also doesn't do type checking by itself, they recommend using tsc [2]. [1] https://docs.deno.com/runtime/manual/advanced/typescript/faqs#what-versions-of-typescript-does-deno-support https://docs.deno.com/runtime/manual/advanced/typescript/faq... [2] https://bun.sh/docs/runtime/typescript#running-ts-files https://bun.sh/docs/runtime/typescript#running-ts-files
- pjmlp 3y agoUntil they bundle Microsoft's compiler, it isn't the same thing. It is like tracking down if a C bug in GCC relates to developer, or GCC understanding of ISO C documentation. Just this alone proves it isn't the same thing, => Deno tries to keep up to date with general releases of TypeScript, providing them in the next patch or minor release of Deno.
- whstl 3y agoThe “Microsoft compiler” is exactly what tsc is, and is exactly what is bundled with Deno. Sorry if that wasn't clear.
- willsmith72 3y agothat feels like a really weak value prop to me. how often do you have to install that stuff? how hard is it actually? can you really not use, e.g. for react, the typical vite starter and it's done?
- tarruda 3y agoIt is more a matter of trust than effort, eg being less exposed to supply chain attacks.
- vorticalbox 3y agoits not that much of an issue, i have created a template repo in github that i can make new projects but not I have to maintain it.
- mcintyre1994 3y agoThe other side of it is if you want to distribute your code not as a server. If you write a CLI in Node + TS + ... then it might be pretty fiddly for someone to clone that repo and get it running locally. You'll certainly have to document exactly what's needed. Whereas with Deno you can compile to a single binary and let them install that if they trust you. Or they can `deno install https://raw.githubusercontent.com/.../cli.ts https://raw.githubusercontent.com/.../cli.ts`, or clone the repo and just run `deno task install` or `deno task run`. For those they need to install Deno, but nothing else.
- mcpeepants 3y ago> then it might be pretty fiddly for someone to clone that repo and get it running locally with node + TS, it is straightforward (and common) to generate JS output at publish time for distribution. then, using the CLI tool or whatever is only a `npm install -g <pkg>` away, no extra steps. sure it's not a single binary, but I'd argue _most_ users of a general CLI utility don't necessarily care about this.
- Kinrany 3y agoFor one-off scripts: every time. So Deno is better at small scripts written in Typescript than Node. Then, the question becomes, if you're going to have Deno installed and if it works well enough to replace Node, why keep Node?
- pjmlp 3y agoBeing an old dog in the prairie, I see the outcome of these projects being like egcs, and io.js. They create some riff, make the key incumbent improve itself, and then the world moves on as if nothing happened.
- rob74 3y agoOTOH the ways that you can improve upon node's shortcomings while staying compatible with it are limited. Bun is taking the pragmatic approach of providing fast drop-in replacements for node, npm and other standard tools, while Deno was the original creator of node going "if I started node today, what would I do differently?". So, different approaches...