2015-03-12 11:41 GMT+02:00 Lester Caine <les...@lsces.co.uk>:

> On 12/03/15 09:21, Arvids Godjuks wrote:
> > Basically this.
> >
> > Yasuo asked me some time ago how do I see the new interface, and to be
> > frank, I do not see a new procedural api interface at all. We have one
> > now, and adding a new subset of it looks pointless. It has it's problems
> > and legacy, you can't really fix it. Maybe some adjustments are in order
> > to make it more consistent where it can be done.
> >
> > I really see only the OO API as a new additional interface. It's part
> > started by the DateTime, the MySQLi classes and stuff. At this point all
> > that stuff can be still namespaced, adjusted if needed and continued,
> > just from the std library first.
> > I, actually, use _ for function and variable naming and camelCase for
> > object methods and properties.  To be frank, I like it - it visually
> > clearly separates the code styles and for the most part the PHP code is
> > written that way (well, the MySQLi has ->num_rows and stuff - i'd change
> > it to ->numRows and so forth).
>
> This is exactly the same point I've come to ...
>
> That MySQLi example is exactly what I am talking about. I know Postgres
> driver has been 'underscored' but it is THAT which is out of sync with
> the rest of the code base. interbase driver has the same problem, and we
> will need to bring in fbird_ to replace ibase_ there, but I use ADOdb
> almost exclusively which has been CamelCase since day one ( all be it
> with a leading capital ). PDO is camelCase but that has other problems ;)
>
> If there has to be any tidy up, like you, I think switching back to
> loose some underscores is the less painful option.
>
> --
> Lester Caine - G8HFL


Do you mean the PostgreSQL driver needs to be changed from pg_blah() to
pgBlah() ?
If that's the case - why? For procedural API that's totaly fine. As I said,
I think the functions with _ word separator are totaly fine and it's really
no need to change that.
The OO interface, that needs to be build eventually, that one should use
camelCase for all the methods and properties.
This way the code style clearly separates the OO inteface and the
procedural interface. And I think it's good. At least it served me well all
my 10+ years with PHP.

Arvids.

Reply via email to