PHPGenerics / php-generics-rfc

Mirror of https://wiki.php.net/rfc/generics for easier collaboration
186 stars 1 forks source link

Keywords #14

Open mindplay-dk opened 6 years ago

mindplay-dk commented 6 years ago

Make sure we have notes where needed regarding the reservation of new keywords, such as is, in and out.

Alternatively, avoid reserving these as keywords by making them part of generics syntax only.

Consider adding a dedicated section on formal generic syntax describing keywords etc.

orolyn commented 6 years ago

As long as the keywords are used within the confines of the feature, then it won't be an issue. It is already possible to contextualize tokens, just as needs to be done to differentiate right shift from double close type arguments.

morrisonlevi commented 6 years ago

I prefer using symbols for an upper-bound over reserving is. C# uses : and Scala use <: (Scala also has lower-bounding, which is spelled >:). Maybe I would like is more if we also had an is operator. I know some people would like that.

I have verified that at least currently in and out do not need to be keywords.