Re: Re: namespaces?

From: Date: Sat, 14 Jul 2001 23:10:41 +0000
Subject: Re: Re: namespaces?
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-776@lists.php.net to get a copy of this message
At 14:07 2001-07-15 +0200, you wrote:
- Return in constructors. For me seems a little bit silly the need off providing an extra method to do the work and get the error back. $foo = new bar(); $err = $foo->build(); //or something similar if (PEAR::isError($error)) { .. } while you could simply do: $foo = new bar(); // or perhaps something like $foo = new::bar(); if (PEAR::isError($foo)) { .. } Tomas V.V.Cox
Hmm, you can always do: $foo = & bar::new(); if (PEAR::isError($foo)) { .. } and do all of your init in new(). Kinda like Smalltalk does it. /erik hjortsberg

« previous php.pear.dev (#776) next »