« first day (4271 days earlier)      last day (660 days later) » 

11:44 AM
morns
 
 
2 hours later…
\o
 
 
6 hours later…
 
1 hour later…
What's the alternative to PHP in this situation? Like pure JS can be just as bad, sometimes worse
I was going to send another message in defense of PHP but then I remember case inconsistency for functions... lol
 
I've heard being a chicken farmer can be okay.
 
JRL
i think it's similar to COBOL, in the sense that it's so well adapted to what it's used for that it's simply better than anything else at that. but what it's used for is so practical, that the depth of business logic that makes its way into the application leads to a lot of the icky things programmers don't like but that are super necessary for what a lot of corporations want to do with software.
 
9:19 PM
PHP still has plenty of problems (that we're gradually eliminating) but the main problem PHP has is a complete lack of engineering knowledge among a lot of its users
2
 
Exactly.
 
@Tiffany It's not case inconsistent, it's just case insensitive. :P
 
I have heard that functions, predefined constants, keywords, etc. are case insensitive because HTML tags are case insensitive, so this part of PHP is designed to fit any coding style.
On the other hand, variables are case sensitive, perhaps because register_globals was enabled by default at that time? I have never heard the actual reason for variables.
 
10:03 PM
I searched this chat to see if anyone knew it and found myself saying the exact same thing 3 months ago and now suspecting my own amnesia...
 
I don't know, but there was a hashmap for functions that had some influence:
Jun 24, 2021 at 20:27, by Mark R
I do wonder what they were thinking back then... I've heard Rasmus talk about using the function name length for the hash bucket etc... but many things just leave me scratching my head
So having function names be normalised to a particular case before hashing, could maybe have been a thing?
 
That has to hold a top spot in the trophy case for consequences of premature optimization
 
really? above:
Jun 6, 2020 at 10:23, by Danack
@IluTov Rasmus optimization aka optimisation.
 
oh dear
 
JRL
php.net/manual/en/reserved.keywords.php <-- is enum really not a keyword?
 
JRL
fascinating
couldn't several of the existing keywords be done this way as well?
to make them non-reserved keywords?
 
What would be the advantage?
 
JRL
i dunno. more flexibility i guess. just seems... interesting that this particular keyword wasn't reserved when others in the past have been. i guess there was a motivation to do so with this since enum was a more commonly used class name.
 
It's very hard to take something back after you've given it away, without workarounds (why that workaround was done in the first place).
 
@MarkR No, it was not knowing that hashes existed.
 
JRL
10:35 PM
hey @Danack. do you think that including polymorphic operator resolution is worth doing in the next iteration? or do you think just shifting to magic methods is the better option?
 
I have no idea what "polymorphic operator resolution" means.
 
(I'm glad you asked that, because ive been sat here for 5 minutes trying to work it out)
 
lol
 
If you mean the positional argument thingy for operators.....then, the answer to "is worth doing" would probably still be, I have no idea.
 
JRL
github.com/JordanRL/operator-overloads-in-php/blob/master/… <-- code example of polymorphic handler/operator resolution
basically, when determining which handler to execute if their are competing handlers with two classes, instead of always using the left hand operator, if one of the classes is a subclass of the other, its handler is used regardless of position
this is how it is done in most other languages that have structures like classes
that don't have method overloading that is
Python operates all overloads in this fashion
 
10:55 PM
gut instinct: sigourney_weaver_encountering_the_chompers.mp4
sounds like it makes code hard to reason about.
 
JRL
i think it doesn't make it harder or easier to reason about. without it, it's hard to reason about how to use classes that have an inheritance structure (like Number and Fraction). your calling code has to use them in a particular order, or your parent class has to have code that is aware of all child classes.
so previously it was hard to reason about subclasses
now it would be harder to reason about subclasses that don't actually have anything to do with each other
though im struggling to think of a situation where a class and subclass would BOTH have implementations for an overload that are NOT identical where you WOULD NOT want polymorphic handler resolution to happen
 
11:18 PM
Well it would probably make bwoebi campaign harder for it...
 
o/
 
11:42 PM
@JRL Okay, yeah, I get why it's important. And yes.
 
JRL
11:53 PM
Alright. I'll take a look at some point on how to do that, since I'm not sure off the top. I'm sure there's some helper function somewhere that works on the class entry to check if its a subclass.
 

« first day (4271 days earlier)      last day (660 days later) »