Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35723 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34653 invoked by uid 1010); 22 Feb 2008 11:00:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34638 invoked from network); 22 Feb 2008 11:00:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2008 11:00:51 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.146.179 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 209.85.146.179 wa-out-1112.google.com Received: from [209.85.146.179] ([209.85.146.179:15643] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/B1-22931-16BAEB74 for ; Fri, 22 Feb 2008 06:00:51 -0500 Received: by wa-out-1112.google.com with SMTP id l24so395731waf.17 for ; Fri, 22 Feb 2008 03:00:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=qKvphtgQ8FCxQmRgRM0iG8sfcP4EBNJI/EGgrv3Xzxo=; b=a3NTQXTgfQmBfb4MvwKShaJu1R2yKzGz7bUzLZjv6sMm8i/awLiAUhyh2zMb0qcdc7s3jz1GDnOSmw82zw1urKp9JEngH2BCtGzf0j+FOtAV+/o8epUwkyQrkRFY5Snxu0M6+SldJj8xiKnkOAgFXeLWNpwlaeHdK5W6KCNLvTQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HiBCOFbdB7Yhvv7oTwfz/J44n4RtdV7/nLDW/0NEiPhO57S1lT2be1jd8fZbUB62RP6KT7xOLlHWt7yMfM2ARG8wDGgv06LTfx9oGMUZCIL/V8HWmZKeUbfjRJTxZxPyVEMaZko+VYpOJtCmtAbzUWQsgCvLV1NugsM+bhK9wJQ= Received: by 10.114.80.4 with SMTP id d4mr4999556wab.44.1203678046979; Fri, 22 Feb 2008 03:00:46 -0800 (PST) Received: by 10.114.209.15 with HTTP; Fri, 22 Feb 2008 03:00:46 -0800 (PST) Message-ID: <10845a340802220300t50072babh43ca299010147808@mail.gmail.com> Date: Fri, 22 Feb 2008 11:00:46 +0000 Reply-To: RQuadling@GoogleMail.com To: ceo@l-i-e.com Cc: "David Coallier" , php@stefan-marr.de, internals@lists.php.net, "=?UTF-8?Q?Marcus_B=C3=83=C2=B6rger?=" , "=?UTF-8?Q?Johannes_Schl=C3=83=C2=BCter?=" , "Sebastian Bergmann" , "Alexandre Bergel" , "Falko Menge" , "Sara Golemon" , derick@php.net In-Reply-To: <33475.98.193.37.55.1203621640.squirrel@www.l-i-e.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <001c01c87264$3c01b4e0$b4051ea0$@de> <58510.98.193.37.55.1203374232.squirrel@www.l-i-e.com> <33475.98.193.37.55.1203621640.squirrel@www.l-i-e.com> Subject: Re: [PHP-DEV] RFC: Traits for PHP From: rquadling@googlemail.com ("Richard Quadling") On 21/02/2008, Richard Lynch wrote: > I am not complaining. > > I think it's a FINE proposal. > > I'm suggesting an alternative solution which is simpler and easier to > implement, with less confusion for new users. > > In fact, new users are often confused because the CAN'T do an include > in the middle of a class -- A rule which, to some, seems arbitrary and > illogical. And once they understand (if they do) why they cannot use "include", they want to know how to do it anyway. Traits answer this quite nicely. All be it in a way which the idea of include would solve if it was done at parse/compile time. So, maybe something as simple as class_include 'file.inc'; where the name has to be a constant (parse error otherwise). But having said that traits LOOK nice. They look clever. Is it over complicated? If you don't know OOP, then maybe. But hell if everything was easy we would have monkeys doing it all for us. Traits look good. Many userland developers would use them. Many more would need to learn how to use them. Let's add them! It certainly would increase the amount of code reuse which MI theoretically is supposed to do. And then lets add accessibility to class properties without magic functions. Richard. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"