FW: [PHP-DEV] default exceptions, interfaces, etc.

From: Date: Sun, 23 Mar 2003 10:16:37 +0000
Subject: FW: [PHP-DEV] default exceptions, interfaces, etc.
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-9575@lists.php.net to get a copy of this message
> From: jani@cs78146114.pp.htv.fi [mailto:jani@cs78146114.pp.htv.fi] On > Behalf Of Jani Taskinen > Sent: Sunday, March 23, 2003 5:51 AM > On 22 Mar 2003, Sterling Hughes wrote: > > >On Sat, 2003-03-22 at 21:33, Derick Rethans wrote: > >> On Sun, 22 Mar 2003, Sterling Hughes wrote: > >> > >> > On Sat, 2003-03-22 at 19:02, Moriyoshi Koizumi wrote: > >> > > Hi, > >> > > > >> > > As per naming convention, I think it'd be nice if the methods were > >> > > named as: > >> > > > >> > > getmessage => get_message > >> > > getcode => get_code > >> > > > >> > > If those are corrected, +1 for this feature. > >> > > > >> > > >> > I was thinking of that - I would personally prefer get_message() and > >> > get_code() naming, but that goes against pear's naming conventions, > and > >> > I want this to integrate well with pear (as a base class.) > >> > >> It's a PHP function, not PEAR code, so it should follow the PHP naming > >> style. > >> > > > >As I mentioned to Marcus, there are no naming conventions for OO code, > >only procedural code (in PHP). Also, compliance with PEAR is a > >pragmatic solution, because presumably all their code will be inheriting > >from Exception. The largest, and the official OO library should be > >in-sync with standard practices (and we have none yet regarding OO > >code.) > > Even if we don't have specific rules (yet) for OO stuff, > IMO, it should follow the existing rules. Well currently PEAR wraps itself around the PHP code and therefore can keep its CS in the public API. But for all I know PEAR does not extends classes implemented in C that don't follow the PEAR CS because then we would end up with a mess. I am not giving a solution here, just pointing to a problem. How do you all feel about this? FYI: I have intentionally left out internals@ out of the CC list because I think this is a touchy subject enough and I rather have us making a joint decision on how we feel about this. CS is a touchy subject and therefore I would like to avoid a flame war. Regards, Lukas

« previous php.pear.cvs (#9575) next »