Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50731 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57598 invoked from network); 30 Nov 2010 14:15:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Nov 2010 14:15:31 -0000 Authentication-Results: pb1.pair.com header.from=president@basnetworks.net; sender-id=unknown; domainkeys=good Authentication-Results: pb1.pair.com smtp.mail=president@basnetworks.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basnetworks.net from 208.97.132.177 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: president@basnetworks.net X-Host-Fingerprint: 208.97.132.177 caiajhbdcbhh.dreamhost.com Linux 2.6 Received: from [208.97.132.177] ([208.97.132.177:42016] helo=homiemail-a20.g.dreamhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1D/04-35426-20705FC4 for ; Tue, 30 Nov 2010 09:15:31 -0500 Received: from homiemail-a20.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a20.g.dreamhost.com (Postfix) with ESMTP id 18BC17EC064; Tue, 30 Nov 2010 06:15:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=basnetworks.net; h=message-id :in-reply-to:references:date:subject:from:to:cc:mime-version :content-type:content-transfer-encoding; q=dns; s= basnetworks.net; b=fhw+FEbmG02gVkt1Lo6aUJIosXSVbU1cfeo88E9eLbUgw SZGX7WhkE/Cewf9wMzHmOyyWoe5y8skMGTSBz1l+Tccyw+hxFGYHG6n3mGr+nbpn Ubq+4Gk5VAr4yyJ+LUQlh2nSXYsVYrP0XMamgOXGFF4W7Wm3UQBaKRCKXrIy0M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=basnetworks.net; h= message-id:in-reply-to:references:date:subject:from:to:cc :mime-version:content-type:content-transfer-encoding; s= basnetworks.net; bh=DqWrPZsS+g91iGtxr0LBdqp6TQM=; b=ONxJLE1TQmcU GmVIWsTgzi22IJKubOw0A0yTSfKaJz7fMzJIVxR0CsEbxs0qCFmhjCwxseHuM+BG gIUvqmxJ1ExlAX7fbum7fvnxWkXhUka3+p3bNdDvyy4CluqVcs3TtjOJmN3WgMQC V4oqrvi0Jnh47ccEF6cHMazYqlBVlHo= Received: from webmail.basnetworks.net (caiajhbdccah.dreamhost.com [208.97.132.207]) (Authenticated sender: president@basnetworks.net) by homiemail-a20.g.dreamhost.com (Postfix) with ESMTPA id A4EEE7EC061; Tue, 30 Nov 2010 06:15:27 -0800 (PST) Received: from 70.28.48.126 (proxying for 70.28.48.126) (SquirrelMail authenticated user president@basnetworks.net) by webmail.basnetworks.net with HTTP; Tue, 30 Nov 2010 09:15:30 -0500 Message-ID: In-Reply-To: <4CF50245.5020807@sugarcrm.com> References: <003601cb8fd0$f6494e80$e2dbeb80$@com> <4CF3B855.5010406@sugarcrm.com> <003401cb8fee$1be39840$53aac8c0$@com> <2450924ae03481f5b1382a7f00e5743d.squirrel@webmail.basnetworks.net> <4CF50245.5020807@sugarcrm.com> Date: Tue, 30 Nov 2010 09:15:30 -0500 To: "Stas Malyshev" Cc: "internals@lists.php.net" User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP From: president@basnetworks.net Hello Stas, >> I do not think that properties should make use of a trait-like syntax, >> as >> that is not what a property is about. A property is basically a layer >> of >> syntactic sugar over a pair of methods. The majority of the time when >> writing properties, you will not want to re-use them, so I have a hard >> time seeing many parallels to traits. > > A side note: in PHP, property actually has four methods, not two - > get/set/unset/isset. That is true for PHP variables. isset is basically saying "does this variable exist", and unset is saying to get rid of it. Because properties (as defined in my RFC) are not a variable, but rather = a set of methods, I do not think there would be any way to "unset" them.=20 Like a method, once they are defined, you cannot get rid of them.=20 Therefore "overloading" isset and unset would not make any sense here. - Dennis