Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54136 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69340 invoked from network); 22 Jul 2011 16:18:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jul 2011 16:18:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:43307] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/00-03772-AE2A92E4 for ; Fri, 22 Jul 2011 12:18:54 -0400 Received: by yxk8 with SMTP id 8so1478306yxk.29 for ; Fri, 22 Jul 2011 09:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Am8WBtW8HECV319mXcvgA2g8q6Nm/i5VFTVC+LynUbo=; b=yzi1cilDjFOJMiSb9/LoXxnoJJbtBxVOvZ9OMP7MsFKs+hn3rf+SVO51kYg2oZVkVR 1qbA7CKFgvqI894jFSn4gBrUq5PvuKJicDcop0fL3t590VAe57RaS3k+NNEZVeqqSms7 ZfX7ZeMDqj15ojyRcbaVjlZNZYOvFjwBgh/Eo= Received: by 10.231.141.207 with SMTP id n15mr1488150ibu.72.1311351527194; Fri, 22 Jul 2011 09:18:47 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.231.168.71 with HTTP; Fri, 22 Jul 2011 09:18:27 -0700 (PDT) In-Reply-To: <4E29A164.3070108@gmail.com> References: <4E29949C.9020209@gmail.com> <4E29A164.3070108@gmail.com> Date: Fri, 22 Jul 2011 09:18:27 -0700 X-Google-Sender-Auth: SX90YBVtRadm-TH_b8_C1O7KSfY Message-ID: To: Alex Howansky Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] 5.4a2 trait attribute name conflict resolution From: aharvey@php.net (Adam Harvey) 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