logoalt Hacker News

moigagooyesterday at 5:54 PM0 repliesview on HN

We use custom types for that usually, optionally with parametric polymorphism.

But as others said already, Nimony (codename for the next Nim iteration) introduces revamped concepts which should be even more convenient.