Rendered at 11:07:09 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
Panzerschrek 5 hours ago [-]
Is it really safe (with no UB in safe code), or just adds some safety features, but still has some loopholes allowing nasty bugs?
slowcache 10 hours ago [-]
I'm not really sure what niche this fills.
To me, the main draw looks to be the invariants that you can supply within functions, but this isn't a new concept outside of it being a dedicated keyword. Otherwise this looks like rust without all of the functionality
nm980 8 hours ago [-]
It looks like a mix between zig and rust I would say
asdkop 3 hours ago [-]
I'm not really sure what your point is. "Rust without all of the functionality" is sort of a ridiculous thing to say given the goals of the two projects are completely different. You can't really apply DbC in Rust, and Rust makes it difficult to iterate upon ideas due to its rigid borrow checker.
yesbut 9 hours ago [-]
> You will notice the trust keyword here. Any operation (such as IO) that has an underlying unsafe mechanism (such as the @print builtin that std.stdio.print uses), must be explicitly trusted, as it is inherently impure.
just document the impure operations and stop forcing the programmer to type extra characters.
asdkop 3 hours ago [-]
Maybe stop being lazy? The goal of the feature is to make code self documenting. It's not my problem if you're a bad programmer.
yesbut 3 hours ago [-]
...or, you know, make something new that improves developer ergonomics. or is that too hard?
asdkop 3 hours ago [-]
Use JavaScript instead, I really don't care about convincing you.
yesbut 14 minutes ago [-]
unfortunately I don't think you are convincing anyone
To me, the main draw looks to be the invariants that you can supply within functions, but this isn't a new concept outside of it being a dedicated keyword. Otherwise this looks like rust without all of the functionality
just document the impure operations and stop forcing the programmer to type extra characters.