Is there a term for types that aren't basic types?...
# getting-started
e
Is there a term for types that aren't basic types? I could say user-defined types, but it's not clear that's inclusive of types declared in the standard library.
y
Technically all types are defined in the stdlib btw, it's just that the basic ones (like Ints, Strings, Arrays, etc) don't have their internals defined in there (instead they're "intrinsic")
🙏 1
One possible term is non-primitive, but that's confusing because primitive usually refers to the non-reference types from Java (
Int
,
Short
, etc).
m
You may want to check what are micro types and/or value objects.
d
I would ask why you need to make the distinction, and what you're actually trying to differentiate.
y
One way I'd choose to define this is maybe intrinsic types, and for those I'd have all the Int-y types, Float, Double, Boolean, and Array. These are all the "special" types that have to be defined differently for each platform. Those types are exactly the "special" ones on the JVM which get referred to in bytecode by a special name instead of an FQN
e
@Daniel Pitts Good question. I'm a teacher preparing slides. It looks like there isn't a single term, or at least not one simple enough for my audience.
d
I'd really focus on the traits that you want to distinguish, rather than naming the group of types that fit those traits.
✔️ 1
Common useful distinctions are data/value types (equality is determined by content) vs identity/service types (equality by identity).
☝️ 1