Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50617 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53229 invoked from network); 27 Nov 2010 05:28:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2010 05:28:51 -0000 Authentication-Results: pb1.pair.com header.from=peter.e.lind@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=peter.e.lind@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: peter.e.lind@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:37757] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/FA-15391-11790FC4 for ; Sat, 27 Nov 2010 00:28:51 -0500 Received: by gxk20 with SMTP id 20so1377716gxk.29 for ; Fri, 26 Nov 2010 21:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=mU8RBh/AQSt18tKor24D1kY38VOaeU9u8/oTlH6DX08=; b=A20eGJxIl8JZs+XE4/sdfQwTdFZQPEHQCy1jm54pWikoFRQHzwS5O809m9pyzrtz49 +9efru3k2V9aWPT0pj9DDVVc1b+OAc68OOa3HNM4akluzWW/80r1divw7azaLojxX3aA sTtSaPFGf1mJ2uPk5MgpgSgIKGNBY3aB51J9A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=S/v5BTFzcXS/yV0LTqO3aPu3/5BDC0BU9haN7Eyk1citvkMKVaaMuqQI+ZmrYStvO0 FVM1tul4i1XafAD0tKHBSt95GfkVHig3pCZLlwCno2iWwzCga84iNO6qGITic4IojyON edkfwOVxa7ixz60HgkTYlVn8aZzpLROHmdg1s= MIME-Version: 1.0 Received: by 10.90.69.10 with SMTP id r10mr2475870aga.121.1290835726358; Fri, 26 Nov 2010 21:28:46 -0800 (PST) Received: by 10.90.91.14 with HTTP; Fri, 26 Nov 2010 21:28:46 -0800 (PST) In-Reply-To: References: Date: Sat, 27 Nov 2010 06:28:46 +0100 Message-ID: To: Gustavo Lopes Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] new foo()->bar() From: peter.e.lind@gmail.com (Peter Lind) On Friday, November 26, 2010, Gustavo Lopes wrote: > On Fri, 26 Nov 2010 20:25:32 -0000, Peter Lind w= rote: > > > 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. > =C2=A0However, 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 effec= ts 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. --=20 WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15