WHAT?

Er, sorry, accidental capslock. This IS a new API. That was an example. I'm
not saying just put -> everywhere, I'm saying we can keep array_* and add a
new set of -> functions which are well-designed, consistent, etc.
On Jul 18, 2012 5:35 PM, "Stas Malyshev" <smalys...@sugarcrm.com> wrote:

> Hi!
>
> > enough but I don't know the Zend engine well enough). This way we can
> > have array->key, array->sort(TYPE), etc. for new code to use, instead of
> > the legacy array and string method mess (the latter needs a cleanup more
> > in particular).
>
> The mess does not exist because we have array_key() instead of
> array->key(). There's nothing wrong with having array_key(). The mess
> exists because functions do not form single API with single principle
> behind it, but were added in ad-hoc manner, sometimes without
> correlating them with others. So, if you want to clean it up, you'd want
> to write a plan how new API would look like and how it will be better
> than old one. If the solution is "let's use ->" then it's not worth it.
> The solution that's worth it is "let's have this better API" and that's
> where we should start, not with changing array_key() to array->key() and
> saying "now we have clean sexy API".
>
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>

Reply via email to