Deno is created by the Ryan Dahl the same person who created the Node to resolve the problems in Node. Following are some problems in node.
- Heavy node packages. — As you know node packages are very heavy and some said it is the heaviest object in the world as a joke.
- V8 engine moves with GN while node initially works with V8 engine with GYP — When node created back in 2009 with c they used the GYP to compile c written code, Initially used by google for v8 and now it is only used by node and v8 engine move for GN
- Security is not managed — In node security is not managed internally.
- Promises are not added — In node promises are not embedded in to it. Then you have to use async functions whenever you need to use await. What happened was initially it was added and then removed.
- pacakge.json — When you hit
npm installit will install all the dependencies in your local project folder and you machine which will tend to have redundant node modules everywhere in your machine.
You can watch the drawbacks in node in more detail in following video.
So why not they add those features in a newer version of node? Because those modifications might change the whole node architecture which might occur backward compatibility issues.
So what are the features of Deno?
- Deno is secured by default — In deno you cannot access anything without giving permissions.
- Support typescript — No tsconfic file anymore. Deno will directly compile typescript.
- Single executable file — Deno will output a single executable file which will easy to ship anywhere.
- Promises are inbuilt — Deno have promises inbuild and you don’t need to worry about adding async keyword.
- Modern ECMAScript features are added — No require anymore.
Hope you get a basic understanding about Deno.
If you have found this helpful please hit that 👏 and share it on social media :)