« first day (4425 days earlier)      last day (506 days later) » 

JRL
12:37 AM
this whole readonly discussion is painful, because i would dearly love a feature that behaves in the way that nearly every single programmer appears to think readonly should behave at first glance
 
@JRL I expect readonly to be modifiable via reflection for example.
 
JRL
@bwoebi If you modify a property via reflection it actually modifies the original object in place? I've never tried to use reflection in that way before.
reflection is kinda special though
 
@JRL yes
 
JRL
would you expect that of an immutable keyword if PHP also had that?
 
I would expect reflection to be able to break all rules, yes
 
JRL
12:49 AM
hmmm. i would kind of expect immutable to actually hold in that circumstance personally.
though generally i agree with the idea you're talking about, that reflection can break all rules
so i dunno
 
@JRL Is it actually that different though? The worst thing IMO is that properties don't need to be initialized after __construct. Interior mutability is allowed for most const-style concepts in other languages.
@bwoebi As long as it doesn't break assumptions in the VM, I agree.
 
It does not currently
 
JRL
@IluTov It kinda goes to the point at the end of my email. Something may be technically correct, but make the language worse/less usable. If almost every programmer has the same misconception, then something is probably wrong with the language design.
 
@JRL Well, what's the assumption that doesn't hold ATM?
 
JRL
Interior mutability, same as you were talking about. It's just very concerning to me that almost everyone I've talked to has at first thought that readonly implied no interior mutability.
 
12:57 AM
Some reference stuff is broken (3v4l.org/4PXG2e) but that's hard to fix and likely needs to be abused purposefully.
@JRL Well, what interior mutability? Value types (arrays, to be specific) are protected against mutability. Just objects aren't, which makes sense to me.
 
JRL
perhaps that's related to the way that classes/objects kind of stand in for typedefs/values in PHP
but only in some programming styles
 
Immutability for reference types from one specific property doesn't really make sense since the referenced instance might be mutated from other places anyway, which would make it potentially more confusing.
 
JRL
right, that's why my initial assumption when i read the initial RFC was that an object assigned to a readonly property must be an instance of a readonly class.
 
That would be very restrictive and annoying when working with instances of library classes that aren't under your control.
 
JRL
true, it would mean that those classes would have to be more carefully designed most likely
PHP objects/classes have too much responsibility, I'm becoming more and more convinced. they try to cover to many disparate programming paradigms, and it results in awkward things.
there should be pointer-like objects in PHP, like we have. but PHP would benefit from something very similar to classes that is set-like instead, IMO.
 
1:11 AM
Anyway, readonly seems to work exactly like C#s readonly (dotnetfiddle.net/4Aj9W0) or TypeScript (typescriptlang.org/play?#code/…) or Swift (swiftfiddle.com/ppo3wbdteva4big22jm6ogonsm) so I'm not sure why people are saying this works differently from other languages.
 
JRL
to be clear, I don't think I've ever made that claim
 
@JRL I'm not saying that we should remove the restriction, but what marco is saying is fundamentally wrong
I can if I want create a child class that breaks LSP, as only part of LSP can be restrained via signatures
Also now that I again reread Marco example, it is again a really contrived case...
 
@Girgias If you re-define LSP to mean something completely different then he's right.
 
@IluTov I've been check mated
But really using a private readonly to then override the behaviour in a child class is like... fundamentally the class is badly designed.
 
JRL
yeah, marco being fundamentally wrong is something i've experienced before. but i don't think the entire conversation should only be about LSP.
which was kinda of the point i was making
 
1:26 AM
@JRL Agreed, but I was pushing back replying for a while as I didn't have the time. But now that aspect seem to be getting traction I justed needed to make it clear that it is in fact theoretically LSP compliant
 
@JRL LSP is about correctness, we're talking more about an expectation. It doesn't invalidate the argument, and it doesn't really matter at all. It's annoying that this is what the mailing list is discussing.
 
^ that
 
2:02 AM
o/
 
 
13 hours later…
3:06 PM
\o
 
 
1 hour later…
4:09 PM
@Derick I've had another look at your ext/date Exception doc. I believe it would make sure to tackle this from a more abstract perspective first: "If we wouldn't be constrained by backwards compatibility, how would we design the Exception hierarchy" and then look at how to apply that.
 
 
1 hour later…
5:14 PM
@moliata Hi @moliata! Are you still around us? What are your plans with the RFC? Please have a look at the new implementation :)
 
@MateKocsis fyi, if someone's name doesn't autocomplete, they are very unlikely to get a notification.
 
 
3 hours later…
7:56 PM
Hey, @MateKocsis; I am currently extremely busy with my studies, however, I will have some free time somewhere in between Christmas and the New Year's Eve, so I'll take a look then, if that's okay. Thank you so much for your work!
 
8:25 PM
@moliata OK, sounds good! Please reach out to me if you need help :) P.S.: IMO it would be nice to have global constant types as well.
 
 
2 hours later…
10:23 PM
@Trowski Are you able to list the contents of SMB mounted directories on the command line? I have a SMB share mounted and it works fine for Finder and apps....just can't do ls -l on a command line.
 

« first day (4425 days earlier)      last day (506 days later) »