All,

I can imagine a case where you would want to box common functionality into a trait and be able to use that trait as a class also. Will we end up with a lot of classes like this?:

class SomeClass {
  use SomeTrait;
}

What's wrong with making all 'Class'es be 'Trait's and the only thing which makes a Trait a Trait is when you use it as such?

class MyClass {
  trait SomeClass;
}

In other words, why mustn't a trait be instantiable? Why can't every Class be a Trait?

-- Dante

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to