About inheritance and abstract types

If all subtypes have the field, then

get_type(curve::BaseType) = curve.type

works. And if some subtype then goes and puts that info elsewhere, then you can special-case it:

get_type(curve::SomeSubType) = curve.some_other_field
3 Likes