# RFC: Traits for PHP

- Thread: https://externals.io/message/35648
- Original archive: https://news-web.php.net/php.internals/35648
- Started by Ford on 2008-02-20T10:39:34+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #35648 — Ford — 2008-02-20T10:39:34+00:00

URL: https://externals.io/message/35648#35648

On 19 February 2008 21:03, stefan.marr.de@gmail.com advised:

> Hi Marcus,
> Hi Troels,
> 
> > […]
> Well, lets try some variations.
> 
> [2a] ! is not readable --> except
> use Trait {
>   except foo1, foo2;
>   bar => foo1
> }
> 
> [2b] ! is not readable --> without
> use Trait {
>   without foo1;
>   without foo2;
>   bar => foo1;
> }
> 
> [Aa] Aliasing is not obvious
> use Trait {
>   bar is foo1;  //aliasMethod is method
> }
> 
> [Ab] Aliasing is not obvious
> use Trait {
>   bar from foo1;  //aliasMethod from method
> }

I may be completely off base with this suggestion, but how about
something as simple as "not" and "as" (which also has the advantage of
not requiring new keywords!):

   use Trait { not foo1 }
   use Trait { foo1 as bar }

Although I can see how this might be considered a touch ugly:

   use Trait { not foo1; foo1 as bar }

 --
Mike Ford,  Electronic Information Services Adviser,
JG125, The Headingley Library,
James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 812 4730          Fax:  +44 113 812 3211




To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
