4 ms·
> easy to tell if a type can have cycles or not at compile-time, you just need to check if it refers to itself Certainly useful at times as I suppose it may be
by throwaway_pdp09 6y ago
> easy to tell if a type can have cycles or not at compile-time, you just need to check if it refers to itself
Certainly useful at times as I suppose it may be used to ensure you don't have cycles (I imagine that could be useful for resource management) but 'can have cycles' is definitely not 'does have cycles'. It's the latter that's important here.
- mratsim 6y agoAnd the ``{.acyclic.}`` hint applies to the later. In the future we might have formal verification helping as well: https://nim-lang.org/docs/drnim.html https://nim-lang.org/docs/drnim.html