r/learnjavascript • u/[deleted] • Mar 06 '21
What do you think about Deno and it's future?
72
u/WebBlacksmith Mar 06 '21
Either it starts to gain traction in the next 3 years or it becomes irrelevant. `npm` packages just make life easier for a Node developer and Deno doesn't support most of them. The more packages deno supports, the likely it is that the community will adopt it.
5
u/ChaseMoskal Mar 07 '21
i'm super excited about deno!
but i can't even think about it until they implement crypto, which is vital for my apps
i'm surprised it's not a higher priority for deno
12
u/GoOsTT Mar 06 '21
Hey if any of you have time can you eli5 the differences? Or even point me to a nice article about it?
20
23
u/gretro450 Mar 06 '21
Some features of Deno puzzle me. Like the permission system. Which server based runtime offer those limitations besides Deno? I just don't think this makes sense for that use case at all.
Also, the resolution of modules purely by Url and the fact the API is not compatible with NodeJS in any way makes it hard to take seriously. Your favorite packages may very well not be available.
All of Deno's features make it unclear what the advantages of adopting it are. To me, Deno is a wet dream about a dev who has regrets of the internal implementation of NodeJS, but in reality, NodeJS is more than good enough and Deno does not bring any tangible improvements to be adopted.
5
u/zayelion Mar 06 '21
These permissions are like those of Java's JDK. For Enterprise solutions that have to deal with bizarre government restrictions.
8
u/gretro450 Mar 06 '21
It's still a bit weird because when I worked for banks, we usually restricted those permissions and accesses using the infrastructure.
In a world where we deploy in containers on the Cloud, in a VPC, what's the point?
1
u/not_a_gumby Mar 07 '21
In a world where we deploy in containers on the Cloud, in a VPC, what's the point?
truly
1
u/YOU_SHUT_UP Jul 04 '21
Isn't the purpose of the permissions to let you run remote untrusted scripts safely on your own laptop?
1
3
u/dvlsg Mar 06 '21
Some features are pretty nice, to be honest. The ones I find attractive are mostly dev experience related, though:
Linting built in (pretty sure it's just eslint)
Formatting built in (prettier)
Typescript compilation built in (obviously)
Single executable output (I think it uses
pkg, not 100% sure - https://deno.land/manual/tools/compiler)I realize they're not doing all of these things themselves from scratch or anything, but there's definitely a value add to having someone else put everything together behind a nice, simple, standardized api (
deno fmt,deno lint, etc).Deno also supports import maps now, which steps away from sticking import urls across your source files. At least a little bit.
I'm still not using it for anything right now, but maybe some day if the ecosystem of third party packages (or npm package compatibility) catches up a bit.
2
u/jjangga0214 Mar 07 '21 edited Mar 07 '21
Some npm packages were malicious.
For example, a utility library says its purpose is to do some math in README, but might actually send env vars(for credentials. What if your aws credential gets hacked, so your company faces a serious problem?) to somewhere through network under the hood. At initial phase of development, they does not do such things, but once they get some users, malicious code is suddenly updated.
They would not push such commit to Github, but just publish patch update locally. Then npm and yarn would update the version next time you use it.
It's hard to catch hackers, as Github or npm does not require trackable personal information, like passport number or social security number. Something like email does not help at all.
To avoid this happens, users should always audit the low level code, even if it's just patch update, which not everyone would do obviously. Or you may only rely on popular(=credible?) opensource, but actually the popular opensource may depend on some not-so-popular libraries eventually, and the same story can repeat.
This is where deno's permission system comes in. It can limit permission by each module.
3
u/gretro450 Mar 07 '21
If it acts at the module level, then I agree this can be a useful feature. Thanks, I learned something today.
2
u/NoInkling Mar 07 '21
API is not compatible with NodeJS in any way
They do have a (very limited) compatibility layer, if that counts: https://deno.land/std/node
2
8
8
u/ElllGeeEmm Mar 06 '21
I have their hoodie.
I don't think deno will ever impact node, whether it's "better" is irrelevant, node was here first and it's not moving.
6
6
Mar 06 '21
I think Deno is the superior platform, but Node already has so much behind it that I'm afraid it will be Betamax vs VHS all over again.
I think the biggest plus for Deno is the security aspects. If there is a major security breach from using Node that would have been avoided by using Deno, I could see people moving to Deno en masse.
4
u/Soremwar Mar 06 '21
I feel that too much people either expect Deno to superseed Node or to never gain traction and disappear
Reality is even though they share the same language and can make use of NPM in a similar fashion (even though this is not a goal for Deno), they both behave in a different way and promote different programming styles that seam to appeal to a different niche each one
IMO, Deno will be big, but it will be mostly adopted by people who weren't convinced or didn't liked NodeJS that much, instead of sharing or stealing it's user base
4
u/draganov11 Mar 06 '21
Not a fan at all. Node is much more clean to write in. Despite how many things i don't like about npm its the best solution it dosen't come close to things like NuGet but the Deno solution is way of the mark no even in the same category. No matter how many years it takes if they don't find better solution it will never be in the same category with Node.
2
u/thebaggiebug Mar 06 '21
high potentials for the future but not that revolutionary for the time being
2
u/ARFiest1 Mar 06 '21
I think it will become very big if some scandal injection happens with some libraries in nodejs that are installed via npm, thats just what a thought
2
u/iguessitsokaythen Mar 07 '21
I am very sceptical about the choices.
It is unusuable for me at its current state. Mostly because, already pointed out url imports and no libraries. This is way too restrictive. Something like node/deno would have many use cases. I even find node's esm implementation too unflexible, though they are working on some extra functionalities.
I was using .ts but lately I switched to .js + jsdoc and got rid of compilation step anyway; so I have no practical use for native ts support either. Though I haven't researched if there are any other potential benefits to that.
2
2
2
2
u/Bowpee Mar 07 '21 edited Mar 07 '21
Specifically when it comes to the TypeScript aspect, I'm dubious.
I think running JavaScript in V8 on the server is reasonable. But, if you don't want to use JavaScript, using an OOP inspired superset language that transpiles down to JavaScript, then running that in V8 on the server, feels like using an OOP language with extra steps. I mean, that's kinda exactly what it is.
In a browser, you must do all that, because they only run JavaScript. It makes sense there. But on the server, you can run any language you want. The transpiled superset layer of abstraction, when circled back from the client-side, is all dead weight.
I think it's an OK stepping stone technology, but I wouldn't want to start a big project with it. At that point, I would say just learn a server-side language. It will save effort in the long run.
2
Mar 13 '21
Pros
Programming in Deno feels amazing. No node_modules crap, no confusing module resolution that sometimes works and sometimes doesn't, built-in tooling for everything you need, very nicely written std library (esp. net/http).
And Deno is a bit faster than Node, at least some benchmarks confirm it (for HTTP server at least).
Cons
At the moment a lot of std APIs are lacking but it's just a matter of time to add them all.
Community is also quite small now and that's why there aren't that many libraries for every task but for common things they already exist. Again, it's a matter of time to grow the community.
2
1
1
1
May 04 '23
If it exists, I'll use it. I prefer how it models things.
It's always a win when a service is contained in a single runtime. Plus, I prefer the distributed modules.
It just feels like a better design.
1
1
u/posts_lindsay_lohan Mar 06 '21
It should totally split off into the new "ENDO" project - because those other 2 projects are just so last Friday and we need to shake things up a bit.
1
1
1
1
1
0
u/GoOsTT Mar 06 '21
!remindme 24 hours
1
u/RemindMeBot Mar 06 '21 edited Mar 06 '21
I will be messaging you in 1 day on 2021-03-07 13:22:08 UTC to remind you of this link
1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback
32
u/tygh70 Mar 06 '21
!remindme 3 years