Yasuo Ohgaki wrote (on 28/07/2014):
  - Consistent naming
  - Consistent parameter order
  - Graceful function/class/interface deprecation
(We know what we should do for these, right?)

I'm not sure if this was meant sincerely, or slightly tongue-in-cheek, but no, we definitely don't. It comes up on the list every few months (I've only been subscribed a short time, but this is at least the 4th time I've seen), and the general conclusion is there isn't an easy answer, and that adding more namespaces doesn't particularly help.

Making small changes, such as extra function aliases, or identical versions of existing functions with switched parameter order, just adds to the overall confusion and list of special cases that users have to carry around when reading and writing code.

That leaves the option of making larger changes, to design a clear new API, deliberately *minimising* the similarity to existing functions so it's clear when you're using what. The popular option for that is migrating chunks of functionality to OOP (as with DateTime), and to pseudo-OOP "scalar methods" (of which there are a couple of prototypes) - not to turn PHP into a pure OOP language, just to give us a chance to design a more consistent library of functions.

Regards,
--
Rowan Collins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to