« first day (4342 days earlier)      last day (616 days later) » 

7:56 AM
@IluTov This looks like a object initializer, and this syntax could also be used outside of class because why not?! $var = stdClass { foo: 'bar' };
Just properties no additional logic, for most of usecases for dto/command/query/events/services(?)
I mean no logic in ctor
 
@brzuchal Because private members, and simply that you wouldn't want to deal with BC breaks when changing internal things.
 
@IluTov beside of private and protected members I see no issues with use of this outside of a class
Most mentioned usecases are public readonly for dto/command/query/events
 
@brzuchal For those cases we have constructor property promotion now. Anyway, this is just a theoretical solution, having both this and constructors likely doesn't make sense.
 
Maybe, dunno. For above usecases I see no point in having ctor, they might be a some kind of struct types, pass by value, no ctor, just property initializer
 
That would work sure, but probably not significantly better than just what we have now with constructor property promotion. You can even name your params, so the syntax is actually pretty close.
 
8:10 AM
The issue with what we have currently is (as I told before earlier in the past)... inheritance.
This is a nightmare with promoted properties, these object have no logic, no methods, the ctor is there only because of this is the easiest way of having initializer and property declaration. WHen you want to share not hevaviour but subset of properties you either have to copy-paste loosing commonalities between the classes or extend ctor and proxy all parent owned properties initialization - nightmare
So with what we have we can try, but that's far from ideal
 
That's true, inheritance and constructor property promotion don't mix well.
 
 
6 hours later…
2:14 PM
Would there be any chance we can nuke list() in the somewhat near future and free up usage of the keyword in places where it is not allowed right now?
Is there any reason why we still need it?
(besides BC of course)
 
cmb
@PeeHaa I guess we can (try to) deprecate it as of PHP 8.3.0, and remove it as of PHP 9.0.0.
Feel free to add that to wiki.php.net/rfc/deprecations_php_8_3.
 
3:10 PM
@cmb Ah, good for pointing out that this page exists. I also wanted to check with zeriyoshi soon-ish regarding some ext/random deprecations for 8.3 :-)
 
@cmb \o/
 
cmb
Feel free to add these, too (unless the deprecations are about big changes). :)
 
@cmb My hope is to deprecate MT_RAND_PHP (that thing is a mess), and also to deprecate rand, mt_rand, mt_srand, srand, mt_getrandmax, getrandmax (getting rid of the global Mersenne Twister). For array_rand, shuffle and str_shuffle which rely on the global MT it would then need to be decided whether they will be migrated to the CSPRNG or also deprecated.
I'd say not "big changes", but it's certainly more than something tiny.
 
cmb
@TimWolla Deprecating mt_rand() and some others might be too premature. After all, the alternatives are only available as of PHP 8.2. OTOH, writing fallback implementations in userland should be trivial. Maybe add it to the general deprecation RFC, and if it gets too controversial, split it out.
 
@cmb Yes, you can just store an instance of the Randomizer in $GLOBALS and use that one. The output is drop-in compatible (this was an explicit goal).
 
3:24 PM
@PeeHaa it might be worth asking someone smarter than either of us, if the improvements in parsing(or maybe lexxing?) that were done for enum might mean that list could be usable as a class name.
 
And frankly, one should just use random_int everywhere :-)
 
@Crell I saw your google doc poll, but I don't understand what it is asking, as it never describes the two alternative syntaxes, and the RFC doesn't have that either.
 
cmb
@TimWolla I think there is still a legit use-case for Mersenne twister, namely if you need a repeatable sequence of numbers.
 
@cmb hey, even C deprecates arachic features, like K&R style function declarations.
 
@cmb Yes. The OOP-ified Mt19937 will remain available and compatible for that purpose. The intention behind deprecating mt_rand() and rand() is that we have 3 very similarly named functions where the right choice (CSPRNG) is also the longest one.
 
cmb
3:36 PM
@Danack Currently, list is a tokenized keyword (T_LIST). If that is dropped, list should be useable as class name. (I'm not smarter than either of you, so I might be wrong :)
 
github.com/php/php-src/milestones - Should a milestone for PHP 8.3 be created, now that PHP 8.3 is open for RFCs?
Thinking about json_validate() and also github.com/php/php-src/pull/9425 is almost ready to be put up for proper discussion.
 
cmb
@TimWolla I'm not convinced that milestones for php-src are really useful; does anybody actually check that all assigned issues are addressed?
 
Actually this is not dumb idea cause it'd work, find as many developers as needed to think of single RFC's that adds non-intrusive non-significant function in next PHP version that create quorum effectively violating good taste and our RFC process.
 
@cmb That I can't tell. But we had one for 8.2, so I asked :-) In the end I'm probably not the intended target of those anyway.
 
cmb
3:59 PM
@bwoebi This might be the reason why many switch to rust :p
Note that I don't agree to "a language should never introduce BC breaks"; on the contrary.
 
@cmb what an asinine take, but somehow unexpected from said person...
 
...
Anyone else got a sense of deja-vu?
 
All the time
 
4:19 PM
Probably all the torpedos going past:
 
4:55 PM
($api?->cover() ?? $db->cover())?->save() 😎
 
 
1 hour later…
6:06 PM
@Mwthreex future you hates present you.
@Girgias apropos of nothing:
Jul 10 at 14:46, by Danack
As to operators, pretty sure it will pass next time without the 'operator' syntax.
Jul 10 at 14:47, by Danack
Though figuring out how to also remain friends with one of the people opposed to it might be tricky.
Though may have figured something out.
 
6:53 PM
I thought @JRL was going to reattempt it with that sort of change
 
yeah, and i'm planning to redraft the words in the RFC and tell certain people to go away.
 
7:10 PM
Fair fair :)
 
 
1 hour later…
8:38 PM
@Derick See the list post that it links to. It goes into detail about what exactly the options mean.
 
 
3 hours later…
JRL
11:54 PM
@Girgias Got married yesterday, so I've been a bit absent the last month or so
but that is still the plan. @Danack and I also agreed to roll in the polymorphic handler resolution as an improvement for the next proposal.
i still personally think a dedicated syntax is better, but i definitely defer to Dan's ability to read the room on that one.
 

« first day (4342 days earlier)      last day (616 days later) »