4 ms·
As others have mentioned, and as the post itself also was updated to say, you don't need const generics to support this pattern: https://github.com/Munksgaard/s
by Munksgaard 7y ago
As others have mentioned, and as the post itself also was updated to say, you don't need const generics to support this pattern: https://github.com/Munksgaard/session-types https://github.com/Munksgaard/session-types, http://munksgaard.me/papers/laumann-munksgaard-larsen.pdf http://munksgaard.me/papers/laumann-munksgaard-larsen.pdf
- cdirkx 7y agoYes you don't need const generics, after all that is what the entire post is about. I was merely offering a perspective on how the const generics might offer an alternative way to express the same ideas, and possibly change the idiomatic way to write them. Type level values, especially enums, IMHO offer an intuitive way to encode what is going on.