On 24/01/2014 20:27, Yasuo Ohgaki wrote:
Hi Larry,
On Fri, Jan 24, 2014 at 10:11 AM, Larry Garfield <
[email protected]>wrote:
On 1/23/14 1:31 PM, Rowan Collins wrote:
Therein lies the whole problem with adding more aliases - it just makes
things more inconsistent, as developers can use (deliberately or
accidentally) different names for the same function.
Agreed. Simply aliasing a bunch of functions offers no useful value, but
does increase confusion. ("Wait, do I use strcmp() or string_compare() on
this project? What version are we on again? Oh, look, this library uses
both. Must have been different devs. FML.")
If we're going to do anything, be aggressive and far-reaching with it.
Build a proper language-level OOP design for string/array manipulation.
We have enough functions lying about. Don't add more.
We should be careful choosing names. I agree.
However, not adding more function names is simply impossible.
The discussion seems to have veered off on a tangent here - we were talking about adding *aliases* (new names for existing functions) that were more consistent/standardised, and why that can cause more harm than good.
Adding new functions for new functionality is an entirely different discussion. In general, I do feel that piecemeal additions like array_column() have a rather marginal benefit, and it would be nice if more parts of the standard library used OOP or at least namespaces, but having a rich standard library of functions is definitely a good thing. The password_* functions, for instance, are an excellent thing to have standardised and ready "out of the box".
But that's all completely beside the point in a discussion about giving existing functions new names.
Regards,
--
Rowan Collins
[IMSoP]