3 ms·
> «inline else» is also very powerful tool to easily abstract away code with no runtime cost. Sure, but you lose the clarity of errors. The error wasn't in `co
by Ygg2 1y ago
> «inline else» is also very powerful tool to easily abstract away code with no runtime cost.
Sure, but you lose the clarity of errors. The error wasn't in `comptime unreachable` but in `inline .a .b .c`.
- jeltz 1y agoI disagree, I would say the error is in "comptime unreachable" or maybe the whole "switch (ab)".
- Ygg2 1y ago`comptime unreachable` isn't the underlying cause and not the place you should fix in this case. A good error tells you what caused it, and where to fix it.
- binary132 1y agoAdding a new case is legitimate, failing to handle it (by reaching unreachable) is an error.