Re: RFC: Traits for PHP

From: Date: Wed, 20 Feb 2008 23:51:29 +0000
Subject: Re: RFC: Traits for PHP
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-35669@lists.php.net to get a copy of this message
John Campbell schreef:
On Tue, Feb 19, 2008 at 3:54 PM, Jochem Maas <jochem@iamjochem.com> wrote:
how about 'possesses' or 'exhibits' - both these words are closer to the natural language usage of 'trait' with regard to a subject. John exhibits a **** trait Jack possesses a **** trait a person coming accross 'use' or 'include' in the context of trait attribution may either make assumptions or become confused as to possible changes/additions to the use and/or include functionality, a new keyword that aptly describes the intention will more likely force users to actually find out what it means.
IMO, the keyword should be a verb because the code is instructing the class to add a behavior. "possesses" and "exhibits" are adjectives which doesn't make much sense. My vote would be something like "acquire".
that's a good point - someone else mentioned 'consumes' which also seems to fit quite nicely. my main point was to use a different keyword to either 'use' or 'include' to avoid misconception, assumptions and basically get anyone not familiar with the syntax to actually RTFM (I'd probably be guilty of glossing over it, if I saw 'include' myself ... ;-) personally I like 'exhibits' ... it sounds right, to me. I don't agree with the argument that non english speaking users would have problems with such a word any more than most other keywords already in use (e.g. 'implements') ... although the spelling of 'possesses' could indeed be rather annoying :-)
Regards, John Campbell


« previous php.internals (#35669) next »