Earlier quoted context omitted.
> Deno glue code around V8 is written in Rust. Maybe this is not the best way of putting it. They use Rust for all the system bits including networking, so it's not like they just wrote some JS to V8/C++ glue code in Rust.
Ok, but even if there's more Rust code in it, i think the expectations of the parent poster are unreal, as for safety, only if V8 VM were rewritten in Rust, and giving its a JIT VM sensitive portions of code would need to be in 'unsafe{}' anyway, so how much safer would it turn out to be even than? Anyway in security terms it will probably turn out negligible as the percentage of code in safe Rust are probably low co…
Deno 1.9
241–245 of 245 posts
Re: Deno 1.9
#242Earlier quoted context omitted.
What I dislike is that you provide these permissions for the whole process. I'd like it to be more that you can constrain and pass the permissions down to libraries like capabilities.
I agree. I hear a lot made of Deno's "security" but process flags don't really make me feel much more secure when I've had to enable most of them anyway. At that point they just start getting in the way and giving me a false sense of security.
Re: Deno 1.9
#243Earlier quoted context omitted.
When Node first released its biggest selling point was being able to reuse web APIs. It also filled in gaps for APIs that weren't standard in browsers. Then browsers started to add these APIs, and some of Node's implementations naturally diverged (aka the idiosyncrasies that you mention). Deno has the advantage that they are starting from a clean slate without the burden of legacy APIs, but how long will that hold fo…
There's the web APIs which are tested against https://github.com/web-platform-tests/wpt (albeit without full coverage), and there is ffi/plugins - for deno specific things like readFile. I don't know the history of Node... but why would there need to be a diversion?
Re: Deno 1.9
#244Earlier quoted context omitted.
How do you actually go about writing isomorphic libraries for browser/deno? It seems like for frontend code you'll have some build system that resolves imports to node_modules, whereas deno code imports from e.g. deno.land. How do you write library code with dependencies that can support that and the other differences in the module systems?
Deno uses ES6 modules, which are supported by modern browsers. There’s no node_modules. https://deno.land/manual/examples/import_export
Re: Deno 1.9
#245Earlier quoted context omitted.
> Hmm, what did I miss, why do people hate them exactly? They operate in a weird gray-zone between being just compile-time types vs. an actual readonly object in the runtime. I don't think I've seen a use case for them yet that wouldn't have been better accomplished with a union type of string literals and using const string literals in the code.
Say all you need is a fixed set of strings that get reused everywhere. What is better accomplished by defining a union type AND consts literals rather vs creating a single string-based enum and using that everywhere? I feel like I'm misunderstanding...
type Color = "red" | "blue" | "green";