Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50705 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95433 invoked from network); 29 Nov 2010 19:40:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2010 19:40:11 -0000 Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 76.96.30.16 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 76.96.30.16 qmta01.emeryville.ca.mail.comcast.net Received: from [76.96.30.16] ([76.96.30.16:47296] helo=qmta01.emeryville.ca.mail.comcast.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/D3-09015-B9104FC4 for ; Mon, 29 Nov 2010 14:40:11 -0500 Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta01.emeryville.ca.mail.comcast.net with comcast id d0jx1f0041zF43QA17g8HA; Mon, 29 Nov 2010 19:40:08 +0000 Received: from earth.ufp ([98.220.236.211]) by omta24.emeryville.ca.mail.comcast.net with comcast id d7g71f0024aLjBW8k7g7lD; Mon, 29 Nov 2010 19:40:07 +0000 Received: from localhost (localhost [127.0.0.1]) by earth.ufp (Postfix) with ESMTP id D440AD7A51 for ; Mon, 29 Nov 2010 13:40:06 -0600 (CST) Received: from earth.ufp ([127.0.0.1]) by localhost (earth.ufp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fqYSl9nu3x5b for ; Mon, 29 Nov 2010 13:40:06 -0600 (CST) Received: from garfield.ad.palantir.net (unknown [209.41.114.202]) by earth.ufp (Postfix) with ESMTPSA id B1B48D7A48 for ; Mon, 29 Nov 2010 13:40:06 -0600 (CST) Message-ID: <4CF40195.7060101@garfieldtech.com> Date: Mon, 29 Nov 2010 13:40:05 -0600 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: internals@lists.php.net References: <4CF3B903.6000204@gmail.com> <4CF3EE8A.4000405@garfieldtech.com> <1291056116.6129.1.camel@guybrush> In-Reply-To: <1291056116.6129.1.camel@guybrush> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP From: larry@garfieldtech.com ("larry@garfieldtech.com") On 11/29/10 12:41 PM, Johannes Schlüter wrote: > On Mon, 2010-11-29 at 12:18 -0600, larry@garfieldtech.com wrote: >> Another advantage here would presumably be performance. If there's >> no >> getter defined then the engine could simply map $foo->bar to the >> class >> member directly (which is really fast) and not to a method, so >> there's >> no added overhead there. That still leaves the question of what >> happens >> with name collisions, though. > > Don't kow what you mean by "the engine" in this case? The compiler? - no > the compiler can't a) it has no idea what type $foo is b) think about > inheritance etc. The executor - well there's no win possible. > > johannes I was referring to the compiler I guess. I don't do C so I have no idea what it's capable of. If that's not a possible performance optimization point, then blargh. I still want to keep the performance implications in mind, as this sounds like something that we'd want to use a lot but could also cost a lot more than it seems at first glance if we're not careful. --Larry Garfield