On Wed, Aug 3, 2022 at 10:53 AM Maurizio Cimadamore < [email protected]> wrote:
On 27/07/2022 23:25, Dan Smith wrote: > > I'm not*totally* sure I grasp all the differences, but here are a > couple of observations that seem to support Model 2: > > I'm not sure I grasp the differences between model 1 and 2 either. > This is probably because they are conceptual-model differences only -- differences in framing, influencing how we talk about things but usually leading to the same outcomes (because we rarely weigh "fits a better conceptual model" as a sufficient reason to *choose* that behavior; the model is usually just playing catch-up). For example: In the same way, universal type-variables cannot answer the question of > "are you a ref or a val" (in the same way in which today's type variable > cannot answer the question of: are you an Integer or a Double). > This would be Model 1 framing, whereas Model 2 might say "it's neither; it is itself, a type variable; the relevant question is what types it is *substitutable* to, or perhaps what *other* types its instances might have". It might be cleaner to think "T is preserving its substitutability for either a ref or val type" than either "T might *be* either a ref or val type" or "T is a special 'ref-or-val' type". -- Kevin Bourrillion | Java Librarian | Google, Inc. | [email protected]
