Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42622 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80008 invoked from network); 14 Jan 2009 21:59:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jan 2009 21:59:11 -0000 Authentication-Results: pb1.pair.com header.from=ionut.g.stan@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ionut.g.stan@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.156 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ionut.g.stan@gmail.com X-Host-Fingerprint: 72.14.220.156 fg-out-1718.google.com Received: from [72.14.220.156] ([72.14.220.156:64064] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/69-34613-E206E694 for ; Wed, 14 Jan 2009 16:59:11 -0500 Received: by fg-out-1718.google.com with SMTP id 16so353730fgg.23 for ; Wed, 14 Jan 2009 13:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=XpodA7YzT6ubXg+Q+mslfU8Lb4YgTK4rT7y8Gp4ND54=; b=qtPPG8uNOTw6e4sMLsYHCeoNhVqqNu0/djgQ3Eb+kLLnzLnw0x+4seKVyj2sePXp3N MpRWUvzh2HUT622CsHHIVp5kqzB/70FoHxQOeF4sX28GxK7kYvQrzpG/q/zreKAHD60P tMxCbgT3C57261Jq/YR1yt/cL4WMIMQhtP3ik= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=jKcaEzJyXKSfqhkzlYgWW3Fd8X0stSMz+5S2zo0MNiI/VYMtBdAZGaMhyzy29RadsR CrY39KvX9nW4VaLlYXl6bRbspmlkX9ndRbQJYmiXQvHvyMhSxtuSCAEj6kuHgJaQLuKw CB1iHG0gCdM56jNcfIM3rvkVD3Z48bE8BCgLE= Received: by 10.86.92.7 with SMTP id p7mr954144fgb.74.1231970348374; Wed, 14 Jan 2009 13:59:08 -0800 (PST) Received: from ?86.106.195.153? (86-106-195-153.stedu.ro [86.106.195.153]) by mx.google.com with ESMTPS id l12sm3259933fgb.58.2009.01.14.13.59.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 14 Jan 2009 13:59:07 -0800 (PST) Message-ID: <496E6030.7000708@gmail.com> Date: Wed, 14 Jan 2009 23:59:12 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20081204 Thunderbird/3.0b1 MIME-Version: 1.0 To: Stanislav Malyshev CC: Marcus Boerger , internals@lists.php.net References: <1016989528.20090112233204@marcus-boerger.de> <496BCD33.4080703@zend.com> <133861245.20090113225847@marcus-boerger.de> <496D2074.3070303@zend.com> <496DD269.4050701@gmail.com> <496E12CE.2080403@zend.com> In-Reply-To: <496E12CE.2080403@zend.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] prototyping From: ionut.g.stan@gmail.com (Ionut Gabriel Stan) Hi, On 1/14/2009 18:29, Stanislav Malyshev wrote: > Hi! > >> That is one example of convoluted code that is already possible. If a >> developer creates such a mess is his fault. > > "Convoluted"? "Mess"? Are you kidding me? It's standard usage of > access handlers. I don't understand how that could be standard when the example was about calling overloaded properties, which isn't yet possible in the language, as you vigilantly observed. Now, regardless whether is convoluted or not, you must agree that is better having callable properties in the language and documenting that this won't apply for overloaded properties. In the end you don't really need callable overloaded properties as a developer already has access to the internals of a class, thus __call() is all he needs to implement them (there would be at least a magic call anyway). It's a trade off but a worthy one in my opinion. Just as right now it is being documented that in order to call a lambda assigned to an instance property you need a temporary variable, it could be easily documented that one should not expect callable overloaded properties and must instead implement __call beside the standard __get/__set. It's a WTF but a smaller one this time. Anyway, there may be stronger arguments against so I'm interested in your opinion. Thanks, I. Stan