On Tue, 17 Jul 2012 12:07:09 +0200, Pierre Joye wrote:

On Tue, Jul 17, 2012 at 2:12 AM, Gustavo Lopes
<glo...@nebm.ist.utl.pt> wrote:

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 isn't a difference in terms of making PHP more object oriented, which was the main advantage advanced by the OP. I'm all for redesigning strings/arrays APIs (presented as an afterthought by the OP), but for that the discussion should be centered on what those APIs will look like, not the syntax one uses to call them.

In fact, quite frequently, syntax discussions make more important design decisions be ignored (see namespaces).

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.

--
Gustavo Lopes

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

Reply via email to