Others will use them and I will need to use their libraries. Get and set magic methods were a mistake too. Same with reflection. Again and again, deeper into the Java 6-land, while Java itself went away a decade ago.
> Others will use them and I will need to use their libraries.
From the outside it's just a property access. The whole point is you don't need to worry about whether it's a direct access or a getter/setter with logic, even if it changes from one to the other between versions.
> Get and set magic methods were a mistake too.
They're definitely not ideal, and thanks to this change they're no longer required for the vast majority of cases.
I need to worry about it if I'm using it in an app. In what job you don't need to worry about what code are you executing? This is the whole point. It makes my job much harder to do, much more hidden and arcane - not worth it to save few characters.
Yes, reflection is a mistake. It's a hotfix for problems caused by OOP. It's not actually necessary.
TypeScript is a good example. Some people write it like Java/C#, with classes, inheritance, reflection, dependency injection. Usually I can get that code down to 20-30% of original size after I cut out the last class (then I forbid the keyword in linter), and none of that is actually necessary or improved the situation.
> In what job you don't need to worry about what code are you executing?
Worry about? Or understand the fine minutia of how every property you fetch or store is handled?
> It makes my job much harder to do, much more hidden and arcane
I don't know how you do your job, but seeing a real (i.e. not a faux property handled by __get/__set) class member's implementation is literally 1 click away in any decent IDE. Clicking to see the potential hooks of a field vs clicking to see the getter or setter (which may or may not even be defined in the same class) is no different.
> Yes, reflection is a mistake. It's a hotfix for problems caused by OOP. It's not actually necessary.
Right. I guess that's why it's applicable to functional programming. To be a hotfix for OOP?
Of course it's applicable, it means "I read the data out of my runtime". Doesn't mean it's what you should do. Like GOTO, mutable variables in global namespace, and so on.