Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67227 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59160 invoked from network); 30 Apr 2013 22:20:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2013 22:20:34 -0000 Authentication-Results: pb1.pair.com header.from=linepogl@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=linepogl@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.46 as permitted sender) X-PHP-List-Original-Sender: linepogl@gmail.com X-Host-Fingerprint: 209.85.219.46 mail-oa0-f46.google.com Received: from [209.85.219.46] ([209.85.219.46:42482] helo=mail-oa0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/6B-18873-FA340815 for ; Tue, 30 Apr 2013 18:20:32 -0400 Received: by mail-oa0-f46.google.com with SMTP id k3so994530oag.33 for ; Tue, 30 Apr 2013 15:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=QE2Wu4+dlJkAuX1uCIFmm0H3JZSO0EHtCofkrgJsz9c=; b=odworZjz/L2iq7wT3iOKLZ8pN6um5LxGOzUHcpOVT/7pNVGpk/udc3dpf4x3wv79Qt vjTT3ZAqdbcpjJX1Cm0R3HgnCtf8gfad+rjaiz+kDLjKZLnOZPC4vUjzTsYICENaqbEZ 576O426EEVyTWSC+uLSVqZ0sF4tP/DxSudLmIhLU00NLwbpyWiV56e0qCJk4c2P+1Ujz UCH4SeAw1VoIkQTAIkuTViUPjfj4sDucKHI3Y5jNqMReIJBJmUEB/TkpXTQTprA4SwK9 6+GvDdO36Q6gCcSl1jmK7oasDtmnzSC895sRD+c3DroXouABFsxH1bjOnEka4JihNy9f /1Iw== X-Received: by 10.60.35.197 with SMTP id k5mr41039oej.138.1367360428848; Tue, 30 Apr 2013 15:20:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.154.130 with HTTP; Tue, 30 Apr 2013 15:20:07 -0700 (PDT) In-Reply-To: <518030FD.5030504@lerdorf.com> References: <6245ED6B-2BF7-47B7-80C0-D3B3D8E0B312@strojny.net> <51803086.6020002@sugarcrm.com> <518030FD.5030504@lerdorf.com> Date: Wed, 1 May 2013 00:20:07 +0200 Message-ID: To: Rasmus Lerdorf Cc: Stas Malyshev , Rasmus Schultz , PHP internals Content-Type: multipart/alternative; boundary=089e011847a6a43f2604db9b68e4 Subject: Re: [PHP-DEV] property de-referencing From: linepogl@gmail.com (Lazare Inepologlou) --089e011847a6a43f2604db9b68e4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2013/4/30 Rasmus Lerdorf > On 04/30/2013 01:58 PM, Stas Malyshev wrote: > > Hi! > > > >> I'm proposing we need a way to statically reference an object property= - > >> the object property itself, not it's value: > > > > You probably have use case for that, and it should be pretty easy to > > write a class that does that, but why it should be in the language? It > > certainly doesn't look like something sizeable portion of PHP devs woul= d > > do frequently. > > It is certainly not worth overloading the XOR operator for. > > -Rasmus > > In C#, they had the intention to introduce the operator infoof(...) to get the reflection, not only of properties, but of virtually everything in the language. They abandoned the idea because it is really hard to do that for overloaded functions and they did not want to do all that work for a half baked feature: http://blogs.msdn.com/b/ericlippert/archive/2009/05/21/in-foof-we-trust-a-d= ialogue.aspx However, PHP does not have overloaded functions, which makes things significantly easier, so maybe it is worth examining the idea. Lazare INEPOLOGLOU Ing=C3=A9nieur Logiciel --089e011847a6a43f2604db9b68e4--