« first day (4431 days earlier)      last day (742 days later) » 

00:43
@JRL A "Scone vs Biscuit" ... that makes no sense. A British Scone is nowhere close to an American Buiscuit.
JRL
JRL
AFAIK, british food doesn't have an equivalent of a biscuit
american food doesn't have an equivalent of a scone either
JRL
JRL
i mean
a british scone is very similar to a biscuit, it's just not served and consumed in the same way usually
it contains more sugar and uses milk instead of cream or buttermilk
but it's very similar to a biscuit
 
9 hours later…
09:46
@Crell that seems like it matches with what I would consider consistent to current behaviour.
@Crell I do tend to agree with @Derick that the "calling of __set for readonly properties" probably needs to be revisited for consistency's sake, but I also can understand 100% that you don't want to burden your RFC with that particular discussion
@Crell @IluTov and while I'm on it - I saw the draft for your hooks RFC. I generally like it, but again: I think the interaction with magic methods needs to be tweaked.
A property with a set() hook pretty obviously shouldn't call __set(), or the same for get()/__get; but I think I would expect a protected/private property with an afterSet() or beforeSet(), to still call __set() if there's no set() hook.
One of the few benefits of the __set/__get approach is that e.g. libraries can provide functionality without needing to repeat a lot of boilerplate on every defined property that wants the library behaviour for that property.
Allowing the two systems to coexist gives developers a lot of power (yes and potential to shoot themselves in the foot, the face and the crotch) - e.g.
- validate per-property using beforeSet();
- let library provided __set() record a changed property (and actually set it);
- trigger per-property actions using afterSet();
 
1 hour later…
11:29
@Stephen That's fair. I don't really care too much about __set so I'm fine with this adjustment if Larry is.
 
4 hours later…
15:06
@IluTov the only alternative I can see that would have the same flexibility, is being able to declare the new hooks block at a class level, but I think that's likely getting too complex/confusing in terms of syntax, for not much gain over the existing magic methods.
 
3 hours later…
17:49
The hooks RFC is still very much in flux, so I'm not wedded to anything on the __set front, other than "I don't want to be blamed for breaking someone's BC". :-)
If you're talking about like an object-level beforeSet/afterSet, that's probably possible but I'd consider it well out of scope. Swift actually has some other way to package up accessor implementations for reuse that... I don't really understand so we're ignoring. :-) Though I suspect in practice "you can call methods" is probably sufficient for the 80% case.
@Stephen I'm going to assume Derick agrees and update the RFC accordingly.
18:13
As long as I'm here, does anyone else have thoughts on the shorthand syntax for aviz? (private(set) string $foo, with public-get implicit)?
I think it's going to be mandatory if/when we allow readonly, but without that, it's kind of a wash compared to what we have now.
19:21
@Crell I am not a fan of implicitness.
I'm at a loss for googleable keywords, and I can't remember where to find this page on php.net... anyone know where we have documented to set up email forwarding with a PHP account?
@Crell I can see how that might be concerning - at a glance it might look like just private. I tend to be explicit in my code so I wouldn’t use the abbreviated form at all. Can you expand on “going to be mandatory w/readonly”?
@Stephen Several people complained about the resulting verbosity of a-viz. Imagine in the future public protected(set) readonly string $s - That's just very long and clumsy.
@Tiffany I don't think there is a doc page for that.
blargh, alright...
I vaguely remember reading some kind of guide that helped me figure out how to do it, trying to remember where it was
more digging through chat history, I go
19:27
It's part of your master.php. net record
@Crell i think I’d still be more concerned about the “accidentally implicit public get” than the verbosity there, and I thought the general consensus was to be “conservative” initially and relax things later (ie readonly __set limitation) if it’s deemed “safe”
@Tiffany You might have a login for this: master.php.net/manage/users.php?username=tiffany
You can allow dropping the public later - making public required later would be a BC break surely
@Crell Doesn';t your rfc forbid readonly with avis?
@Crell Hiding some part of that certainly isn't going to make it easier to understand, it's long and clumsy, because there's “much to it” that's important to know.
19:30
@Derick I think this is a future proofing exercise for when if/when it’s allowed together
@Derick I have it switched that I can receive email, but I'm trying to figure out how to send email from the account. I used to have it set up through gmail, but I don't like how gmail does it... and wanted to try setting it up through FastMail, but need to find the right keywords
@Stephen On readonly, yes. No one objected to the abbreviated version until yesterday. :-)
@Tiffany Oh, yeah, the PHP project does not have a public SMTP server for sending email
my hope was that if I could find the guide I had used for gmail, it would give me enough context that I could search for the same behavior for FastMail... but ultimately I just want to be able to send email from PHP account using FastMail
@Stephen Correct. We added the shorthand based on feedback on the list when readonly was permitted. Since we're dropping readonly for now, that makes the question of whether the shorthand is still valuable relevant. (I think it's definitely valuable when combined with readonly.)
19:36
@Crell I must admit I was pretty focussed on a single ahem other problem I saw in the rfc; I don’t see this as a complete show stopper - assuming it’s still possible to use the explicit form - but I do see how it can lead to issues/confusion, and I’d expect a decent number of projects/devs would forbid the implicit style.
oh, figured it out, that was ... ... a lot easier than I thought
@Stephen Yes, full explicit is included, that's not debatable.
Id personally prefer to see something like public:protected [readonly] string $foo rather than protected(set) [readonly] string $foo but I’m aware the bikeshedding for syntax has come and gone.
I.e two visibility’s makes more sense to me than one with (set) appended
shrug.gif
I expected protected:set to be the winner, but the poll said what it said, and I'm not going to pick a fight over it. :-)
Gotta go get lunch, laters.
@Crell fair enough - ultimately the exact syntax is not as important I think, as the actual behaviour. So I guess my informal “vote” would be to leave out the implicit form initially and cross that bridge later. I guess it could be a secondary vote on the initial rfc?
20:03
@Ekin I don't know what there is left to do?
 
3 hours later…
22:54
@Stephen Also to be clear why we opted for not calling __set in the first place: We wanted to picking the wrong option that is hard to reverse. If we call __set, people will obviously start depending on that. A visibility \Error on the other hand is not something people should be depending on, so we could always adjust the __set behavior later.

« first day (4431 days earlier)      last day (742 days later) »