Comment

Comment by Polyisoprene

Would dependent types help in this case? Add the reference type when creating the type and then you could have the compiler check that the contract holds.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton