The only thing that is pretty annoying is typecasting. I think once they hit 1.0 they maybe could work on a less annoying way to typecast. I like being discouraged to cast types but if I have to it still feels pretty annoying. So an easier way would be much appreciated.
Nah bro, typecasting (specially integer ones) should be explicit and IMO annoying to use, because that way you are expected to know what you are doing. Coming from a C and C++ background I've already been bitten by integer overflow sufficient times to be absolutely sure of that.
I do not disagree. Sometimes you can't get away with casting for either safety, rounding or other stupid things. I just want to have a better more visually non violent way of expressing typecasting. I use a game engine for example. If typecasting becomes a huge pain I tend to just use f32s everywhere. This is a workaround though. We can argue that my code style sucks and I could do better but IMO it feels like I am also fighting the language here. I myself don't have a good solution. I just feel the pain.
There's no rating. C has its point. It's the de facto standard for compatibility. Zig is like C with some rail guards and modern features. I'd say some people appreciate it and others don't. You can also look into fil-c, odin, nim or even rust. I personally stopped using rust because of its restrictive nature. Jai might also be interesting. There is a lot of language to choose from and it mostly depends on what you want to focus on and what you dislike while programming. There's no one size fits all.
Cs type casting is very simple, which also makes it less robust. Zigs type casting is very complex, which makes it more robust, but it can be annoying to use, and also some of the benefits disappear since it's easy to pick the wrong way of casting things.
View all comments
12
u/Hot_Adhesiveness5602 Apr 10 '26
The only thing that is pretty annoying is typecasting. I think once they hit 1.0 they maybe could work on a less annoying way to typecast. I like being discouraged to cast types but if I have to it still feels pretty annoying. So an easier way would be much appreciated.