RFR: JDK-8314477: Improve definition of "prototypical type"

Joe Darcy darcy at openjdk.org
Thu Aug 17 20:25:31 UTC 2023

On Thu, 17 Aug 2023 11:27:07 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Use an index tag to make the definition of "prototypical type" more findable.
> src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java line 91:
>> 89:     /**
>> 90:      * Returns the type defined by this class or interface element,
>> 91:      * returning the <dfn>{@index "prototypical type"}</dfn> for an element
> Since we are here - another term the JLS uses for synthetic types that are given to some expression (for the purpose of some computation) is _notional type_ which might be easier on the eye.

Hmm. Okay, from searching through the JLS 20 pdf "notional type" looks to be introduced in 4.9 "Intersection Types". The term looks to be introduced in the JLS for Java SE 8.

JSR 269 has used "prototypical type" since its introduction, so for this changeset I plan to keep that terminology.

As future work, it could be helpful to take a pass over the javax.lang.model.* type discussion to see how it could better align with evolution of JLS terminology since the API was introduced.

A general discussion of denotable and non-denotable types might be helpful too.


PR Review Comment: https://git.openjdk.org/jdk/pull/15320#discussion_r1297702409

More information about the compiler-dev mailing list