News for hackers. Stuff that matters.
Re:Compile-Time Dependent Types by n923263 on Friday October 30, 2026 @05:23PM (#50310332)
A good mnemonic is that that if X and Y are finite types[0], sum, product and exponent types are just doing the relevant arithmetic on the types.

(Bool->Bool,Uint8+()) is just a verbose way of saying (2^2 * (256+1)), where 1,2, and 256 are types with the appropriate number of elements.

The cases involving infinite types are just a (straightforward?) generalization of that.

0: eg 0=noreturn [1],1=void,2=Bool,256=uint8_t

1: Much like in set theory, zero is the empty set.

There are no comments on this comment yet.