Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54137 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70804 invoked from network); 22 Jul 2011 16:23:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jul 2011 16:23:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=mikegstowe@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mikegstowe@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.46 as permitted sender) X-PHP-List-Original-Sender: mikegstowe@gmail.com X-Host-Fingerprint: 209.85.161.46 mail-fx0-f46.google.com Received: from [209.85.161.46] ([209.85.161.46:40092] helo=mail-fx0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/40-03772-4E3A92E4 for ; Fri, 22 Jul 2011 12:23:01 -0400 Received: by fxh19 with SMTP id 19so5199608fxh.19 for ; Fri, 22 Jul 2011 09:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=xypaD/cRdWfsE8OIN8vngF2ITKdg6gNQSYMDuoWZnq4=; b=rjeUHH8MGldDny6OItZHbUaySIRLzEdLCUsdkTXcQObqWw5raJKgN5RIJ9NKG34ShA OE48jzMLbnDM6jtVJBNEit//jotmRILtFKMUrmV/zMSUsBUMcsMh+ACNV5uXckitUEVU g8L+BXjnFTRW0vQxj9RPZsv8K/cqk/qU/iiyM= Received: by 10.223.145.7 with SMTP id b7mr309961fav.56.1311351778071; Fri, 22 Jul 2011 09:22:58 -0700 (PDT) MIME-Version: 1.0 Sender: mikegstowe@gmail.com Received: by 10.223.2.7 with HTTP; Fri, 22 Jul 2011 09:22:38 -0700 (PDT) In-Reply-To: References: <4E29949C.9020209@gmail.com> <4E29A164.3070108@gmail.com> Date: Fri, 22 Jul 2011 11:22:38 -0500 X-Google-Sender-Auth: YXQnGvhJJ9xBbk3H1lBWC90QWvw Message-ID: To: Adam Harvey Cc: Alex Howansky , internals@lists.php.net Content-Type: multipart/alternative; boundary=0023545bf334e856d904a8aae09e Subject: Re: [PHP-DEV] 5.4a2 trait attribute name conflict resolution From: me@mikestowe.com (Michael Stowe) --0023545bf334e856d904a8aae09e Content-Type: text/plain; charset=ISO-8859-1 I agree with Adam, I think it would be nice to let the trait contain its own properties which can then be overwritten by the class properties. This way we could include default properties that the trait may be dependent on, while providing the opportunity to override individual properties to provide a specific reaction for the class the trait is used in. Just curious, if the trait property is set to private what happens? - Mike On Fri, Jul 22, 2011 at 11:18 AM, Adam Harvey wrote: > On 22 July 2011 09:12, Alex Howansky wrote: > > > >> That makes sense if it would overwrite the methods as well, but > >> otherwise it seems like it provides inconsistent functionality. > > > > Exactly. At the least, it's inconsistent. If it's a bug, then it seems > the > > question becomes: > > > > Is the bug this: > > > > "Properties defined in a trait should be overridden by same-named > properties > > defined in a class that use the trait." > > > > Or (as pointed out by Anthony) this: > > > > "You shouldn't be able to define properties in a trait." > > Traits definitely need to be able to support properties, IMO, so I'd > say that the first behaviour just needs to be documented (and > potentially a notice added). Either the trait or the class is going to > have its property overwritten, so we should pick which definition wins > and go from there. > > Adam > > -- ----------------------- "My command is this: Love each other as I have loved you." John 15:12 ----------------------- --0023545bf334e856d904a8aae09e--