Type identify rules

Based on this post:

I think the answer is no.

There is a bit of wiggle room, you could argue that only the size of T should be depended upon and this shouldn’t be a full dependency on T itself, but as far as I know Zig currently doesn’t have such fine grained dependency tracking and instead just expects the programmer to write it in such a way, so that you don’t make your type depend on more than you intended.


Or said another way, I think both behaviors are a reasonable thing to want based on use-case, so it seems reasonable to have a way to write each of them.

4 Likes