Re: [binarycloud-dev] Re: [PEAR-DEV] db abstraction: pass by reference versus return
| From: | alex black | Date: | Thu, 11 Jul 2002 16:09:52 +0000 |
| Subject: | Re: [binarycloud-dev] Re: [PEAR-DEV] db abstraction: pass by reference versus return | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7668@lists.php.net to get a copy of this message | ||
> > 2) Alternatively the method can either return the data or an error
> > object. ("the PEAR DB way").
>
> For the records: That's my favourite way and I'm for sticking to
> it. The reasons for this are described below.
I'm for this as well. binarycloud basically uses this standard at the moment
as well (with PEAR errors.
I think it is the most intuitive.
> > I think this is a major useability question so I just wanted to ensure
> > that this is done the way people really want it to be.
Yes, thanks for asking :)
> > Somehow 1) seems like the comp sci way of doing things as it just feels
> > cleaner to me. :-)
The theory is a bit cleaner but I think the practice of 2 is simpler, which
is its advantage. That and it's a standard in both binarycloud and PEAR.
> Yeah, may be, but IMHO 2) is just more intuitive, since people are
> used to work this way: Nearly all PEAR packages work this way right
> now. Using 1) in MDB/DB will cause a bit of inconsistency then because
> we'll have 99% of the PEAR packages using 2) and just 1% using 1).
Agreed.
_alex