You could write a compiler for a low-level language in anything. Honestly makes little sense that most people do it in C++ when they’re only going to replace it anyway.
kool_newt@lemm.ee 1 year ago
Zig
Choosing a high-level language would limit your world so all of those are out. I could make my own high-level language if absolutely necessary from Zig but the reverse is not possible.
Zig > C as it’s easier to write safer more secure code while being as fast or even faster than C, and usable in embedded and other places only C is normally used. In fact, I can create C binaries with my Zig compiler.
Zig > Rust because actually writing safe Rust code would use all my time and sanity so would end up writing unsafe Rust, but then what’s the point.
Zig > Go because Go is slower and backed by one of the most evil entities to ever exist.
porgamrer@programming.dev 1 year ago
philm@programming.dev 1 year ago
Zig > Rust because actually writing safe Rust code
Start thinking more functional, I rarely have issues with the borrow-checker, or even have to write
unsafe
. But it obviously depends on the context, when the issue at hand really requires a lot of interior mutability orunsafe
can be pain.I’m also super fast nowadays with Rust, probably faster than with any other language (thanks to great tooling?).
kool_newt@lemm.ee 1 year ago
Start thinking more functional
Sounds like good advice, thx.
deur@feddit.nl 1 year ago
If you cannot write safe Rust code, it places your ability to ever write safe code in doubt.