4 ms·
I'm not sure exactly what is meant here, but you just have the whole language available and you can express whatever constraints you want on the types of things
by anonymoushn 4y ago
I'm not sure exactly what is meant here, but you just have the whole language available and you can express whatever constraints you want on the types of things.
- Rusky 4y agoThe problem is that you have to do that by hand, and thus it will be possible to get out of sync with the actual requirements of the generated code, leading to C++-like template error messages that have to include the entire stack for you to make sense of what went wrong. Or in other words, there are two parts to checking constraints: checking that the caller satisfies them, and checking that the callee doesn't accidentally rely on anything beyond those constraints. Zig's approach only gives you the first one.
- deleted 4y ago[deleted]