Closed ta0kira closed 3 years ago
Actually, this would just add to the dependencies required when linking binaries that use built-in types, so I'm going to hold off on this for now.
FromInt
could still be useful for creating sequences of values.
For example:
@type range<#x>
#x requires AsInt
#x defines FromInt
(#x,#x) -> (Order<#x>)
// ...
traverse (range<?>('a','z') -> Char c) {
// ...
}
This would have been ugly before the addition of
#self
. The implementations for built-in types can just delegate tobool.toInt()
, etc.