Is [distinct](https://nim-lang.org/docs/manual.html#types-distinct-type) not 
what you need?

You can define the needed operations from its base type using `borrow` pragma 
so you don't have to cast/coerce every time you use it

Also, I did what @cdome suggested, defining `converter` s and it works like 
charm. I have several subtype and using converters to convert back and forth 
between the base type and its subtype.

Reply via email to