In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the difference between Deno and Node. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The difference between Deno and Node
It is built on V8 (the JavaScript engine used by Chromium and Node.js), but unlike Node, it takes advantage of the security advantages of V8 sandboxie. There is no file, network, or environment access unless explicitly enabled.
Unlike Node.js written in C++, Deno is written in Rust.
Deno_core is a Rust package that anyone can use to embed the JavaScript runtime into Rust, and Deno is built on top of deno_core.
Another package, Rusty_v8, provides Rust binding to V8 C++ API; it "tries to be a secure interface", but not 100% secure. "being able to interact with a virtual machine as complex as V8 in a secure way is quite amazing, which allows us to discover many difficult bug of Deno itself," Dahl's post explained.
The scheduling of Deno is handled by Tokio, which is the asynchronous runtime of Rust. Another key component is TypeScript, which is the main language in Deno. You can run the TypeScript file directly without compiling it to JavaScript.
Deno itself is a complete ecosystem with runtime and its own module / package management system. This provides more room for all the tools built in and successfully eliminates many shortcomings in JavaScript development. For example:
By using the Web standard, Deno can perform outdated validation of its API; in addition to JavaScript, it has TypeScript, which eliminates the compilation burden and allows tighter integration; built-in tools mean you don't have to waste time looking for products that are ready to use out of the box; distributed package management frees users from npm, bringing fresh air to ECMAScript modules compared to declining CommonJS; will Deno replace Node?
In any case, blessed by the halo of Dahl, coupled with the "future-oriented" design, Deno will certainly become a hot topic.
However, although the version number of Deno is 1.0, it is still in a very early stage, some parts of Deno API are unstable, and according to the document, the standard module of Deno is not stable. The team also says that the TypeScript compiler used internally is very slow.
Their intention is to port the TypeScript compiler to Rust, even though it's a big project. If it is done, it will be helpful to all TypeScript developers, so the Deno team is also calling for help.
Therefore, it is too early to discuss whether Deno will replace Node. But with one more wheel and one more road, the emergence of Deno must be a good thing for the front-end field.
Thank you for reading! This is the end of the article on "what's the difference between Deno and Node". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.