Re:OCaml for the Masses (2011)
by vram22 on Tuesday November 27, 2018 @05:32PM
(#18547476)
I'm not the person you asked, but I don't think domain-specific user-defined types (whether defined as subclasses or subranges (see Pascal) of existing language types, or another method as Steve said), are supposed to be automatically interchangeable or equivalent to the existing type they are derived from (without a cast or conversion of some kind), otherwise it would defeat the purpose, which is better type or range checking.
[ Parent
| on HN ]
There are no comments on this comment yet.