On Friday, November 26, 2010, Gustavo Lopes <glo...@nebm.ist.utl.pt> wrote:
> On Fri, 26 Nov 2010 20:25:32 -0000, Peter Lind <peter.e.l...@gmail.com> wrote:
>
>
> It seems fairly handy and I've been in situations where I wanted to do
> something like that - in fact, I use factories to achieve something
> similar.
>  However, the more I use it, the more it feels like introducing code
> smells into my code. You're essentially instantiating an object only
> to immediately throw it away.
>
>
> Not necessarily; you could be calling the method for the collateral effects 
> and that method return the object itself. This is not that uncommon.
>

And I can do that today with a factory pattern, if I want to.
Anyway, I don't want to argue against the feature, as it will just
introduce a slightly shorter version of something we can already do.

-- 
<hype>
WWW: plphp.dk / plind.dk
LinkedIn: plind
BeWelcome/Couchsurfing: Fake51
Twitter: kafe15
</hype>

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to