RE: [PHP-DEV] Re: [PHP6] Function name consistency

From: Date: Wed, 29 Jan 2014 15:08:21 +0000
Subject: RE: [PHP-DEV] Re: [PHP6] Function name consistency
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message

> On Thu, Jan 23, 2014 at 6:11 PM, Larry Garfield <[email protected]>wrote
> >
> > 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.
> >
>
> This is a completely honest, sincere question: Why should the language
> itself use an object-oriented design for everything it provides?
>

Compare: $str = str_replace('-', '_', $str);

To:      $str = $str->replace('-', '_');

Or: $keys = array_keys($array);

To: $keys = $array->keys();

I think it looks a lot cleaner, self-explaining, shorter, and if you are used to write OOP, it fits
better to the rest of your code.


Thread (46 messages)

« previous php.internals (#71728) next »