6 ms·
deno is 'node' shifted by two letters. What do you use nodejs for? That's what you use deno for. It exists in the same space. So in short, deno is a javascript
by TheDong 6y ago
deno is 'node' shifted by two letters. What do you use nodejs for? That's what you use deno for. It exists in the same space.
So in short, deno is a javascript interpreter suitable for local scripting, server/services, etc. Just like node.
You can probably use it for desktop applications, but it more closely targets server code, again like node.
So how does deno differ from node? It has a different module system and stdlib (better, more modern). It has first-class typescript support. It has much better security controls so that it's possible to use it to interpret untrusted code (this is not security advice).
The 'untrusted code' bit means deno's also gunning a little for the niche lua and other embedded scripting languages occupy, but I don't think it has much of a foothold there yet.
- otabdeveloper4 6y agoAs someone who has done lots of embedded Lua, I can confidently say that embedding V8 is definitely not what I want. I want an embedded statically-typed language that compiles directly to something that is memory layout compatible with C++. We have 1001 languages now, but it looks like I'd still have to write my own to get what I want...
- oblio 6y agoI'm not a low level dev, but I've read quite a bit about this over the years. I have a question: > I want an embedded statically-typed language that compiles directly to something that is memory layout compatible with C++. Isn't this asking for ABI compatibility with C++? I thought C++'s ABI is unstable so nothing can be compatible with it.
- otabdeveloper4 6y agoNo, it isn't. I'm okay with recompiling every time my compiler changes, it's not a big deal and we have sources for everything we run.
- crocodiletears 6y agoAny experience embedding deno in a c++ application? I absolutely lovehow seamlessly lua integrates into my code, but I just find the language itself absolutely unpleasant to work with.
- vinkelhake 6y agoDeno uses V8. If you want to embed a JS runtime in C++ then just use V8 directly. Deno is mostly written in rust.
- crocodiletears 6y agoAh, I hadn't realized that. For some reason I fell under the impression that it was its own JS engine.
- yesbabyyes 6y agoIf it's the syntax that troubles you, you could have a look at MoonScript, a little language that compiles to Lua, inspired by CoffeeScript and bringing with it some niceties.
- jitl 6y agoI think QuickJS is the best option for embedding a JS interpreter. It’s a bit on the heavy side, but it supports a lot of modern ES2020 stuff. https://bellard.org/quickjs/quickjs.html https://bellard.org/quickjs/quickjs.html
- tomcam 6y agoOK that is like the best explanation ever. Thank you.
- Datsundere 6y agowould this mean you can't build electron apps with deno?