News for hackers. Stuff that matters.
Re:D as a C Replacement by lordnaikon on Wednesday July 03, 2019 @02:58AM (#20342198)
If you fight with the rust compiler the same amount as you do with a C compiler than you're making something wrong in both languages. Don't get me wrong but the rust and C compiler are on the direct opposite of the spectrum – for me. I love how the rust compiler is holding my hand to avoid all the nasty bugs i would introduce into my code.
Re:D as a C Replacement by petre on Wednesday July 03, 2019 @03:57AM (#20342466)
The overall experience is similar. Rust definitely has better error messages. The difference is that in C once your program actually compliles it can also easily segfault at runtime. With D and Go you just compile the program and it works. It only complains when you're doing something awfully wrong instead of being a grammar nazi all the time. Additionaly, D allows you to enable or disable certain features if you wish to. Want safety? Use @safe and @trusted functions. Want to disable the GC? Use @nogc functions. And the list goes on. One can enable all of these on demand.

https://dlang.org/spec/function.html#function-safety