Community
Chat Logs
Wednesday, June 17, 2026
- dreamrealgah, I hate reading stuff where I'm left going "... wait, why is this new? $foo has had that for a while now, that particular syntax looks okay but how does it... OHHH. Ew."
- jreicherdreamreal: why is what new?
- jreicherOn a different note, I just did something I never thought I would do. A deliberate upcast so that the compiler can verify a caller won't do something to the returned object.
- jreicher(Not without being naughty, anyway)
- ernimriluh? is doing a cast being naughty?
- jreicherNot an upcast. Not at all.
- jreicherIn fact you couldn't avoid them before covariant return types were added to Java.
- jreicherThat's an implicit upcast every time, right there
- jreicherAnd actually is what I'm doing now. This method is "explicitly non-covariant"
- jreicherHardly ground breaking, but it never crossed my mind I would want something like this.