

things to regret about node js today
source link: https://dev.to/vishwasnarayan5/things-to-regret-about-node-js-2ech
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

You have only started using Node agin in the past 6 months, because when RAYAN DAHL created Node, your goal was mainly to program event-driven HTTP servers, and Go is a better language for building faster servers.
But he thinks JavaScript is good. Dynamic languages may not be suitable for building servers that you want to control everything, but they are the right tool for prototyping, such as scientific computing. JavaScript is the best dynamic language.
Your Node problem is almost related to the way you manage user code. Mainly because it focuses on event I/O, the module system is essentially an afterthought.
failed to fulfill the promise
- It is possible that the unified use of promises in Node will speed up the delivery of standardization and async/await.
Security
- The node program can access all system calls, such as writing to disk and accessing the network.
Build System
- If you are writing a module link to a C library, you will use GYP to compile the C library and link it to Node.
- Chrome used to use GYB, but now Node is the only GYP user.
- Funky interface, which is a Python adaptation of JSON. The node has several unnecessary complex wrappers.
package.json
- Includes
NPM
in Node, making NPM a standard for Node distribution. Centralized repository (privately controlled) of modules. - require ("sommodule") is not specific: package.json, local node_modules folder, NPM database.
- promotes the concept of "module" to an unnecessary abstraction of file directories. It does not exist on the network.
- includes unnecessary information such as licenses, repositories.
node_modules
- The analysis algorithm for module is extremely complicated.
- Vendoredbydefault is kind, but $NODE_PATH will work.
- There is a deviation from the browser.
- does not need to be extended.
is unnecessarily unclear.
- is not the way browsers work.
- The module loader must guess.
index.js
- It unnecessarily complicates the module loading system.
- is especially unnecessary after package.json which needs to be supported.
https://github.com/ry/deno
Security
- By default, the script should run without write access to the network or file system.
Users can choose to access via the following signs:
- allownet
- allowwrite
- It is not allowed to bind any native functions to V8.
The TypeScript compiler is built into the executable file.
- TypeScript is beautiful.
- finally delivered a practical and optional type language.
- enables code to grow seamlessly from fast hackers to large, well-structured machines.
- Normal JS should work too.
The simplified module system does not support node modules.
- The import is just a relative or absolute URL.
- The import must provide an extension.
- remote URLs are fetched and cached indefinitely on the first load.
- can be sold by specifying a non-default cache directory.
Other
- Only submit an executable file with the fewest links.
- Start the runtime by compiling the node module with parcel into a package.
- Always died immediately because of a promise that was not fulfilled.
- supports top-level wait.
- browser compatible (
window
is notglobal
) #node #deno #javascript
Recommend
-
19
Now the story of an Elixir library and the one author who had no choice but to take it away.
-
27
Docker is the dangerous gamble which we will regret (written by lawrence krubner,...
-
8
Counterfactual Regret Minimization with Kuhn Poker This notebook gives an introduction to Counterfactual Regret Minimization using the game Kuhn Poker. If you have comments find me on
-
11
I see Tailwind being used by a lot of people. I totally get why it’s so popular. It looks great, the design choices are sensible, and you have copy-pastable code that reliably renders in the same way. It nets you r...
-
8
2011/06/10 YOU WILL REGRET THIS My Other Mood is 'Even More Angry' So I was at this year's London Erlang Factory, and I presented a lightning talk there named 'YOU WILL REGRET THIS' talking about a...
-
7
Meeting regret: Overcoming the fear of saying the wrong thing Earlier this week, a mentee approached me with meeting regret. She didn’t regret what she said or did during a recent meeting. She regretted with she didn’t sa...
-
4
I regret buying the Switch Lite and you probably will, too ...
-
8
10 Things You’ll Regret When You’re Older, if You Aren’t CarefulUnless you put in the effort nowimage by Gert Stockmans from Unsplash.comWhy is this topic crucial to a life well lived?Because thi...
-
6
Learn to accept and love yours...
-
6
People Are Revealing The Expensive Things They Don't Regret Buying, And I'm Taking NotesLiz Richardson...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK