Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50610 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82563 invoked from network); 26 Nov 2010 22:19:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2010 22:19:10 -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.160.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.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:55430] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/20-15391-E5230FC4 for ; Fri, 26 Nov 2010 17:19:10 -0500 Received: by gyf2 with SMTP id 2so1243912gyf.29 for ; Fri, 26 Nov 2010 14:19:07 -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=P13AM+kkhxRUwLSzpMctyF5moEKAjj7mN6OCJJrnByd9h06NpJAdbjOjNmvwxlfIQK oNHaf125Hknx45ogQwszapkRGYIosgAfyOCVR292zgqgW6ddqjqgW8Dx0BJm7eU2oKEG noxeKMwfaOGF2Cy/k73xqx+8tU6OXJwXs+IEM= 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=obpxfxm9dlNpgLpJBLkoAaJA4i4rPT1dvIXYpZox2YMSlv3av5ah9LFfsBbDROf/5u ybGsaawMv/8uxYqQ7dr71mJvKfeuN3C47fC4XdctRpi4+z8NRbdC7xVKPoE5gT2K6Ij3 xPNgGEcf4y0nv8zpHUWGGD/lCgXN+XjxUWL1c= MIME-Version: 1.0 Received: by 10.91.11.30 with SMTP id o30mr2095690agi.94.1290809947680; Fri, 26 Nov 2010 14:19:07 -0800 (PST) Received: by 10.90.91.14 with HTTP; Fri, 26 Nov 2010 14:19:07 -0800 (PST) In-Reply-To: References: Date: Fri, 26 Nov 2010 23:19:07 +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