Follow

@gemlog Zig looks like a nice language, but Rust doesn't look hard to learn either — true, some things are done differently, memory management in particular — not what everyone's used to, but to me it at least makes sense, unlike how it's done in GC languages. Some textbooks Go examples make me wonder why this memory is usable at all at this point? 🤪
I don't like everything about Rust, but I think a lot of problems come from how people expect languages and compilers to work.
@amiloradovsky

@m0xee @gemlog AFAICT Rust doesn't even use dynamic memory allocation (not to mention automatic, GC): all allocations are done at compile time, without a runtime and relying on datastructures analogous to those used to implement malloc (arenas, pools, brk, mmap, etc.)
@amiloradovsky @m0xee @gemlog Box in Rust is basically a wrapper around malloc. Also, Rust does buttloads of dynamic memory management under the hood.

@amiloradovsky Well, yes, it's explicit about memory management. That was one of the main goals behind its creation — to eliminate RAM leaks, ill fame of Firefox at the time. And it came out very nice — way better than C++ they were using, some say that's a very low bar, but they still got the tool they wanted — a language similar to C++, sans the syntax, that is reasonably low level, but suitable for large desktop applications and with memory safety.
Toml-files are yuck though!
@gemlog

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml