Replying to Avatar Daniel Wigton

I am qualified to talk about the benefits of Garbage collectors. It isn't up to you. You can disregard my opinion. Saying rust has a garbage collector like JavaScript and python is being willfully disingenuous. It does not. It merely inserts calls to free when values no longer have an owner. It is no different from c in terms of machine code emitted by the compiler.

Pretending that compile time checks for ownership are some how the same as a watchdog process counting references and pausing at run time to free memory as needed is silly.

One has deterministic behavior, the other can very wildly depending on the hardware it is running on or the version of the runtime used.

Yes rust has reference counted pointers, but they are self encapsulated and have the same predictable behavior.

I am not saying GC languages are bad. I really like C# and even have a soft spot for PHP. I am just saying no GC language is "a better c" since they are just different things.

I wouldn't even say that rust is a better c, it has nice abstractions but it does introduce a very small amount of runtime into the binary. It is closer than a GC language but still a different thing.

I definitely appreciate that something like go is faster to get a performant application up and running. Rust is tedious. But it really isn't that tedious. You can get a web service up in a weekend with it as well and have it be fully async while you are at it. Just pull in Tokio and maybe actix or Rocket, both make making routes to whatever you want to do, dead simple.

I am currently looking into Rust for some DB code that does high-performance processing.

Trying to optimize the GC would be about as much effort as just using Rust.

About C, it may as well be human readable portable assembly. Great for embedded platforms that I’m working with, otherwise something I don’t want to touch unless necessary

Reply to this note

Please Login to reply.

Discussion

I don't get the C avoidance. It's the programming 101 standard at uni, for a reason.

Because productivity matters

Yeah, the productivity of the user.

personally, C is fun to use (most of the time), but my productivity is just way higher in Rust and other languages