On Thu, Sep 17, 2020 at 1:00 PM Matthew Brown <matthewmatt...@gmail.com> wrote:
> > On Sep 17, 2020, at 1:28 PM, Brent Roose <bre...@stitcher.io> wrote:
> > But I don't want to get stuck on phrasing, if elidiing is the right term as 
> > Larry suggests, let's go with it!
>
> No, the correct term is “type erasure”:
> https://en.m.wikipedia.org/wiki/Type_erasure

"type erasure" with respect to generics means that they are checked at
compile-time and erased at run-time. For instance, Java does generics
through type erasure, and you had better believe those get checked at
compile-time! This isn't what is being proposed, at least not how I
understood it.

Really these are just "hints", but historically in PHP the term "type
hints" meant actually type checks.

In summary:
- Checked at run-time (and probably also compile-time when possible):
reified generics.
- Checked only at compile-time and thrown away at run-time: erased generics.
- Not checked at all: ____?. Maybe we can call them "ignored generics"?

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to