Re: Re: Proposal: Rename image functions
| From: | Christoph M. Becker | Date: | Tue, 07 Nov 2017 11:50:22 +0000 |
| Subject: | Re: Re: Proposal: Rename image functions | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101080@lists.php.net to get a copy of this message | ||
On 07.11.2017 at 02:53, Andrea Faulds wrote:
> OOP would be nice for avoiding having to type image* constantly.
>
> But as for the hard-to-read naming, OOP isn't necessaary, IMO. The
> current GD API's naming without underscores cries out for camelCase. And
> that's possible for methods… but it's also possible for functions! Both
> are case-insensitive, so in fact, you can already type GD function names
> in camelCase and the code will work. The problem here is we have a
> convention of writing global function names in the manual in lowercase,
> something we don't do for methods.
The convention is rather to document function names in their canonical
form, i.e. what's returned via reflection.
> The simple and pragmatic solution is
> to make an exception and document GD in camelCase, as God intended.
> (Probably.)
I don't know what God intended, but it seems that Rasmus intended
PascalCase, see <http://php.net/manual/phpfi2.php#imagearc>.
--
Christoph M. Becker