▲ | mattwilsonn888 3 days ago | ||||||||||||||||
I think you are clearly good-faith. The issue is the underlying and unfair assumption that is so common in these debates: that the memory-unsafe language we're comparing against Rust is always C/C++, rather than a modern approach like Zig or Odin (which will share many arguments against C/C++). You can prove to yourself this happens by looking around this thread! The topic is Zig vs. Rust and just look at how many pro-Rust arguments mention C (including yours). It's a strong argument if we pose C as the opponent, because C can be so un-ergonomic that even Rust with its added constraints competes on that aspect. But compare it to something like Zig or Odin (which has ergonomic and safety features like passing allocators to any and all functions, bounds checking by default, sane slice semantics which preclude the need for pointer arithmetic) and the ergonomics/safety argument isn't so simple. | |||||||||||||||||
▲ | tialaramex 3 days ago | parent | next [-] | ||||||||||||||||
The ergonomics of Odin are ghastly, it's all special cases all the time. For example, in Rust when we write `for n in 0..10 {` that 0..10 is a Range, we can make one of those, we can store one in a variable, Range is a type. In Odin `for i in 0..<10 {` is uh, magic, we can't have a 0..<10, it's just syntax for the loop. in Rust we can `for puppy in litter {` and litter - whatever type that is - just has to implement IntoIterator, the trait for things which know how to be iterated, and they iterate over whatever that iterator does. In Odin only specific built-in types are suitable, and they do... whatever seemed reasonable to Bill. You can't provide this for your own type, it's a second class citizen and isn't given the same privileges as Odin's built-in types. If you're Ginger Bill, Odin is great, it does exactly what you expected and it covers everything you care about but nothing more. | |||||||||||||||||
| |||||||||||||||||
▲ | simonask 3 days ago | parent | prev | next [-] | ||||||||||||||||
Zig is an immense improvement, but it’s not a production language at the time of writing. Not a lot of people feel qualified to actually compare the two. At the same time, I will argue that Zig’s improvements over C are much less substantial compared to something like Rust. It’s great, but not a paradigm shift. | |||||||||||||||||
▲ | ksec 3 days ago | parent | prev [-] | ||||||||||||||||
Thank You that makes a lot of sense. I guess we will have to wait for Zig to become 1.0 first and then do a proper comparison. |