3 ms·
> feel like compiler could use some more strict warnings, too Warnings in Zig are called 'compiler errors'. Which is to say, Zig doesn't do warnings. If the c
by AnIdiotOnTheNet 5y ago
> feel like compiler could use some more strict warnings, too
Warnings in Zig are called 'compiler errors'. Which is to say, Zig doesn't do warnings. If the compiler thinks there is a problem, you must fix it. Usually you've made a mistake, but sometimes you just need to be explicit about what you want to happen. In this particular case I believe there is an issue raised about it, but I couldn't find it on github.
> Zig float literals have type comptime_float, which is essentially the largest type, ie. f128. To use a different type you have to cast it first and I’m not loving the syntax: [...]
> It is also a bit inconsistent, as some functions (like pow) will take a type parameter and allow for comptime params: [...]
Yes, this is an inconsistency in the standard library that hasn't yet been addressed as Zig currently doesn't place a high priority on polishing the standard library.