4 ms·
I am always confused about the terminology. I know RangeTypes or RangedTypes from Pascal, but I think in Rust they are something else. The talk mentions SubType
by weinzierl 2y ago
I am always confused about the terminology. I know RangeTypes or RangedTypes from Pascal, but I think in Rust they are something else. The talk mentions SubTypes in the ADA context which I know from an OO context, but again it seems to be different. Then there are Refinement Types which seem to be more powerful but subsume the others. And now we also have Pattern Types.
Can someone bring order in these concepts?
- Lucretia9 2y agoAda has ranges and subtypes. type Angles is 0 .. 360; subtype Acute_Angles is range Angles'First .. 90; Subtypes can be used with the parent type without conversions. Pascal only has subranges, iirc.