> Deno is just Node with a restrictive, annoying permission system

I find Deno's permission system amazing! (although I didn't stick with it until v2)

Everything is closed by default but you're able to write code like normal.

Whenever it needs a permission the code pauses (like `debugger;`) and the terminal asks you "hey, should this script have access to this file/folder"?

- You say yes and the code continues (no need for exceptions).

- You say no and the code stops.

Then after your program has run, you put only the answers you said yes to in a deno.json file and it never has to ask again.

---------------------------------------

I'm currently working on a project that takes in heap of files from one one set of devs, processes them with a heap of files from another set of devs, then compiles and outputs the final product.

The file structure goes like this:

1. Group one devs

2. Group two devs

3. Build output

4. Compiler

So group one only works in their folder, and group two only works in their folder, but needs to see group one's folder.

With Deno it's stupidly easy to do stuff like:

- Scripts in group one only have file read access to group one.

- Scripts in group two only have file read access to group one and two.

- Scripts in the compiler only have file read access to group one and two's folders, only have file write access to build-output folder, and can read the env file in the project's root directory.

- One specific file is only allowed to access a specific URL and port

- Another specific file is only allowed to use the FFI to access a specific shared object.

I don't need to worry about a dev's script accidentally using the wrong file because they messed up the path.

I don't need to worry about a dev accidentally overwriting a file and losing data.

I don't need to worry about a dev blindly going down the wrong road because an LLM convinced them to.

I don't need to worry about a dev using LLMs agents that are trying to make the project do something it's not supposed to do.

I don't need to worry about a dev including a dependency that's doing what it shouldn't be doing.

I don't need to worry about the equivalent of `rm -rf ./$BUILD-OUTPUT` but the env file wasn't set up correctly and $BUILD-OUTPUT is empty/undefined evaluating to `rm -rf ./` and nuking the project's root.

I don't need to worry about supply-chain attacks.

I don't need to worry about namesquatting attacks.

There's so many things I don't need to worry about.

It's such a breath of fresh air.

It's just: you guys read from here, other guys read from here, the compiler writes to here.

Whenever something doesn't fit, the program stops and tells you what file is trying to access what permission.

---------------------------------------

aside: Node added a permission system but it's completely broken by design. Everything's open and you have to manually close each permission yourself. Oh, you don't want this project to have file write permissions? Lets just turn off the file write permissions (and forget to also turn off the subprocess permissions to spawn a shell which rm -rf's the wrong folder).