On 6 February 2018 21:10:54 GMT+00:00, Michael Morris <tendo...@gmail.com> wrote: >On Tue, Feb 6, 2018 at 2:54 PM, Rowan Collins <rowan.coll...@gmail.com> >wrote: >> I may be being dumb, but I don't get why you keep referring to this >as a >> "hidden dependency". It's a dependency, for sure, but why is it any >more >> "hidden" than any other utility library?
>The Dependency injector isn't aware of the reference and is unable to >modify it in any way. I've been taught to avoid such dependencies, and >to >avoid utility libraries which create such dependencies. OK, I see what you mean. But surely it doesn't really have much relevance here, because a function or operator from the language's standard library is just as invisible to dependency injection. In a sense, it's still a utility library, just one that comes bundled with the language rather than installed separately. Indeed, a built-in function is even more restricted in what you can do with it than a userland one - for instance, you could replace the userland implementation simply by declaring your version first and not including the original, but you can't overwrite a built-in function without hacking into the engine. I'm not saying this undermines the proposal for adding some extra array functions or operators, but dependency injection and modification are certainly not advantages of doing so. Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php