Comment

Comment by Shadonototra

Zig is still new, so it has room to improve

While i like Zig, it has many ergonomics issues that i just can't deal with.. and it has the tendency to make your code unnecessary verbose

- no operator overloading for your math type, you end up chaining methods..

- no function overloading, you have to do things like 'add(comptime T: type, x: antype, y: anytype)`

then: add(f32, myX, myY);

then be prepared with a shit ton of @floatCast(), it can't guess what type you use so you forced to be doubly explicit..

you end up with code that is barely readable

- unused as error, this one hurts a lot.. you can say goodbye to fast iteration time, if you make a game it'll be painful

Zig is still great, i plan to use it for some project, knowing how to use more language helps train your skills and understand pros/cons of features better

You can crosscompile with D too

    ldc2 -mtriple=x86_64-windows-msvc -c foo.d
Metaprogramming is great, you get more power with D, mixin, proper templates, type introspection

You can link without the runtime if size is a concern, i haven't had any issues with it

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton