No syntaxation without reification!

#php #generics https://externals.io/message/130816

[VOTE] RFC: Add ReflectionAttribute::getCurrent() - Externals

#externals - Opening PHP's #internals to the outside

Actually what I care about is *native implementation of enforcement*, whether that's runtime checks or static analysis. But the slogan was just too good to miss. :P

@imsop I have to admit I was a bit worried for the last few days that my message on internals might have been completely off-base, or that I had phrased it badly, since it got no replies. https://externals.io/message/130816#130856

So seeing your latest idea around separating the runtime-checked layer from the SA-checked layer was honestly a relief. It seems close to what I was trying to get at, although your version generalizes it much better!

This is completely off-topic for the list, so I’m saying it here. :)

[VOTE] RFC: Add ReflectionAttribute::getCurrent() - Externals

#externals - Opening PHP's #internals to the outside

@sji Yes, your message was certainly part of what led me to this line of thinking. Maybe someone else will take it a step further again, and between us all we'll end up with a good solution. šŸ™‚

@imsop What do you think about this proposal?
https://externals.io/message/130816#130857

I like the idea of having slow reified generics with ability to erase them.
I use SA on my projects, but when I hop on other projects what don't use it it's not worth to setting up SA just to have generics. And my colleagues what don't care about SA will still get errors when misusing code with generics.

For low traffic sites you can even use reified in prod, it's not like PHP is a bottleneck most of the time

[VOTE] RFC: Add ReflectionAttribute::getCurrent() - Externals

#externals - Opening PHP's #internals to the outside