DEV Community

loading...

Deno might not kill Node, but something else

patarapolw profile image Pacharapol Withayasakpunt Originally published at polv.cc Updated on ・2 min read

Due to vast popularity of NOT Node.js, but JavaScript itself, and web browsers, I see Deno as a scripting language platform for JavaScript and WASM. It also supports JSDOM, therefore all web browser methods.

It makes JavaScript and WASM comparable to JVM bytecode; but rather for dynamic typing.

It is also comparable to Java's JBang, but I don't see JBang as getting very popular.

Of course, you can also use Python for this as well.

Surprisingly, Golang or Kotlin is just not yet ready for scripting with heavy external dependencies.

Node.js might not be good enough for scripting, because

  • /package.json and /node_modules are required. You cannot simply use global filesystem's.
  • eslint, and probably also prettier and typescript, are often recommendly installed. You don't need these in Deno.
  • Javascript packages with only JSDoc, no .d.ts, when you already use TypeScript.

In short, I will kill other scripting languages.

It probably cannot kill Node.js

It cannot replace Node mainly because it can only replace frontend libraries just as fast as other non-Node.js frontend libs. (Such as Golang's esbuild, and the associated Hugo.)

Node.js is just too popular. And Deno is not yet ready for front-end compilers.

// This is a false comparison.
'node'.split('').sort().join('')
Enter fullscreen mode Exit fullscreen mode

Discussion

pic
Editor guide
Collapse
zoedreams profile image
☮️✝️☪️🕉☸️✡️☯️

no, but i betcha a meteor will kill deno. ;)

Collapse
mzaini30 profile image
Zen

The cons of Deno is not available for Termux. I usually coding in smartphone than desktop

Collapse
maan2003 profile image
Maan2003

have you tried building it yourself

Collapse
mzaini30 profile image
Zen

How?

Thread Thread
maan2003 profile image
Maan2003

This should work

pkg install rust
cargo install deno
Thread Thread
mzaini30 profile image
Zen

Thanks. I'll try this

Collapse
mzaini30 profile image
Zen

/package.json and /node_modules are required. You cannot simply use global filesystem's.

You can use PNPM

Collapse
patarapolw profile image
Pacharapol Withayasakpunt Author

The problem is not size, but ease of use. Why do I always need /package.json? Why cannot be exactly single file?

As well as, this is still required.

# echo 'shamefully-hoist=true' >> .npmrc (or ~/.npmrc)
# As you can see, global store doesn't always have first class support.
pnpm i
Collapse
mzaini30 profile image
Zen

It's not bug. It's feature 😂

Collapse
yujiri8 profile image
Ryan Westlund

I am going to be so mad at our industry if Deno starts killing Python or Ruby.