I think strings are even more important, they have an even messier API than arrays. On Jul 17, 2012 11:07 AM, "Pierre Joye" <pierre....@gmail.com> wrote:
> hi, > > On Tue, Jul 17, 2012 at 2:12 AM, Gustavo Lopes <glo...@nebm.ist.utl.pt> > wrote: > > > Let's ignore empty arguments like "make[s] PHP feel modern". That aside, > the > > main argument advanced in this message makes no sense. > > This idea has been proposed many times in the past and it is actually > a very good proposal, for array, string or other types. > > The only reason why it is not yet implemented is the technical > complexity to do it. We need pseudo objects and the likes, and it is > really not something easy to do, in an efficient enough way. > > > Adding method call > > syntax to arrays hardly makes PHP more object oriented. Syntax is > > unimportant. There's no substantial difference between array_slice($arr, > > ...) and $arr->slice(...). > > There is a huge difference. One of the main difference would be to > finally have an uniform API and not this painful inconsistent APIs we > have to maintain. > > > There is, in my opinion, *one* merit here -- redesigning -- and perhaps > > reimplementing -- the arrays functions API. This will require a lot of > work, > > thought, and time tough. > > Yes, but long due, same for strings. > > Cheers, > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org >