3 ms·
Granted, I'm not a PHP developer, but I can't understand why a change like this would be controversial. It sounds like it's optional, It's only optional when y
by userbinator 6y ago
Granted, I'm not a PHP developer, but I can't understand why a change like this would be controversial. It sounds like it's optional,
It's only optional when you're writing code. Even if you don't use features in your own projects you're undoubtedly going to be reading a lot of other's code, which may or may not use these features, and from that perspective added language complexity is a burden.
- chriswarbo 6y agoAny framework/library code which abstracts over invoking a callable must also be extended to support associative arrays, and to avoid assuming that parameters will be given in the order they're defined. For example, things which play around with call_user_func and func_get_args (e.g. delayed evaluation, partial evaluation, currying, mapping over datastructures, composing/pipelining, etc.)
- hnarn 6y agoSure, but it's only confusing when reading it if it's hard to implicitly sort of understand what's happening when you're not used to it, right? Named arguments seem pretty straightforward to me, in the sense that it's relatively obvious what they are when you see them. It's not exactly like a new operator or some kind of symbol unique to the language that is almost impossible to understand without looking it up.