Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61041 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76960 invoked from network); 29 Jun 2012 14:50:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2012 14:50:55 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:51984] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/93-62543-EC0CDEF4 for ; Fri, 29 Jun 2012 10:50:55 -0400 Received: from [192.168.2.230] (ppp-188-174-54-11.dynamic.mnet-online.de [188.174.54.11]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 9004B62034; Fri, 29 Jun 2012 16:50:50 +0200 (CEST) To: Amaury Bouchard Cc: internals@lists.php.net In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 29 Jun 2012 16:50:45 +0200 Message-ID: <1340981445.2310.5.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC proposal - Syntactic sugar for cloning From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Fri, 2012-06-29 at 16:25 +0200, Amaury Bouchard wrote: > Back in the real world, we are not cloning objects very often. But, like > many other syntactic sugars (as the short array syntax), I think it could > be handy in some circumstances. Well, arrays are used all over the place. As you said: cloning is not. Also this patch only covers one use case, the assignment of an copy. I does not cover other cases, like cloning in an function call foo(clone $obj); etc. So I see little need for that sugar, it will mostly hurt the teeth (to stay in the picture) johannes