« first day (4315 days earlier)      last day (619 days later) » 

4:33 AM
github.com/php/php-src/issues/9272 Hmmm, constant expressions are resolved at the time of the first reference, and what would be an unresolved class constant reference at the time of the current compatibility check may be resolved before the first reference.
Maybe it's possible to support such situations by also delaying the compatibility checking until the first reference, but our current policy is not to expand the scope of early binding but to define classes before they are used, right?
This case is about lazy evaluation, not early binding, but it is about something that allows the use of classes that are not predefined.
Before responding with a "Won't fix", I'll do some more experiments and considerations to see if it's reasonable to deal with this by lazy evaluation...
 
 
2 hours later…
6:29 AM
@cmb yeah I thought so. I don't think refusing to bundle ICU is good for the language but I'm willing to deal with it. we can have some nominal UTF-8 support without it
thanks for linking that old discussion btw, I had forgotten about it…
I like that API sketch
s/nominal/minimal/
 
 
1 hour later…
7:49 AM
How to check if enum is BackedEnum ?
 
8:07 AM
You mean you don't know what enum type you get? Can't you just typehint it?
 
found it: $input instanceof \BackedEnum
 
 
1 hour later…
9:41 AM
What is the use case of BackedEnum of unknown type?
I'm wondering how could that be used and for what purposes.
Normally I know the type of enum so it's obvious to run a match or some conditions, exceptionally translate to backed value, but in all these cases even if translating enumeration to backed value to and from I know the type of enum.
 
 
2 hours later…
11:14 AM
@cmb Can you please approve my PECL account request? I'd like to create a new release for the scrypt extension soon. I guess I'll need to ask its maintainer to add me to the project.
 
cmb
@MateKocsis Request approved. I also added you as lead for scrypt. First thing you should do is to add yourself as lead to package.xml; otherwise you'll be kicked out after uploading a new release.
 
 
2 hours later…
1:34 PM
@brzuchal I believe they are converting from arbitrary input to arbitrary types. So checking if something is a backenum allows them to know how to find the valid input values for that type.
 
2:24 PM
@cmb thank you very much!
 
2:52 PM
You know, readonly may be a useful flag, but in practice it's proving to be evolutionarily a very difficult feature.
 
cmb right now, probably.
 
o/
 

« first day (4315 days earlier)      last day (619 days later) »