4 ms·
the macro uses unsafe inside, so that's another instance of unsafe you'll need to check, whereas the pin macro is like a safe function
by kobebrookskC3 7mo ago
the macro uses unsafe inside, so that's another instance of unsafe you'll need to check, whereas the pin macro is like a safe function
- jibal 7mo agoExcellent goalpost moving! Congratulations!
- kobebrookskC3 7mo agono, you just missed my point. expanding the implementation is not a safe abstraction. show me how you'd implement the functionality of the pin macro as a safe abstraction.
- jitl 7mo agoeverything in zig is unsafe and needs to be checked like rust unsafe, so…
- jibal 7mo agoI didn't miss that you totally changed the subject and now you're attacking a strawman. See Steve Klabnick's response to your other comment where you did this. Of course macros are good for encapsulation and abstraction, but that's a different subject--and note that the discussion was about Zig vs. Rust, and Zig has no macros so there's unencapsulated unsafe code all over the place. I won't respond further.
- kobebrookskC3 7mo agoi was responding this claim > It would be perfectly possible to design a variant of Rust that gets you to 80-90% of Rust's usability, with the same safety, without macros. i then present an api that i think relies on macros to expose a safe api > Of course macros are good for encapsulation and abstraction, but that's a different subject. no it's not. exposing safe abstractions is pretty much rust's raison d'être