It seems the opinion of the typing experts vocal in this thread is mainly in favor of the name TypeForm. To paraphrase:
A
TypeFormis any of the forms of a type, both common forms (i.e. class objects) and special forms.
- The reasoning cited is consistent with the reasoning I used originally when suggesting the name
TypeFormback in 2020: showing an alignment with the existing term “special form”. - Typing experts reasonably argue that “type form” is what the concept is rather than merely how it is spelled, aligning with a preference toward naming the concept for what it is.
- Several folks don’t seem to find the name collision with the Typeform survey product to be a problem in the long term.
TypeValue is an interesting name, well-contrasted with TypeAlias. However:
- I don’t think
TypeValueis sufficiently distinct fromType. Similarly if I had to choose betweenListandListValue, I’d preferListbecause it’s shorter and more direct. Sadly the nameTypeitself is taken. - The contrast with
TypeAliasisn’t really that important, vs showing a contrast withType. AdditionallyTypeAliasis soft-deprecated in favor of thetypestatement, so showing contrast with a less-and-less used construct will be increasingly less informative to users.
At runtime a variable of TypeForm type would indeed contain a “special form” object if it did not contain a class object. So it is a “form” in that sense. Picking a name that aligns with what the concept is seems desirable.
That’s accurate. However if it’s possible to use a term that better aligns with what the concept is rather than how it is spelled, such a term would be preferred.
Regarding what the concept is:
- From the perspective of a user, the concept is a “type”.
- From the perspective of a static type checker, the concept is a “type” (or a “type form”).
- From the perspective of a runtime type checker the concept is a “type expression” (or a “type form”), whose parts are individually introspected and manipulated.
I prefer the user’s perspective over all others where I’m able to.