On Sun Dec 12 04:33 PM, Nathan Nobbe wrote:
> 
> 
> So the 'with/within' tokens would apply to traits.
> 
> I feel 'expect', 'need', 'require' etc sound better, matter of opinion 
> really, but it sounds like from an internals perspective it's 
> preferred to reuse existing keywords if possible.
> 

Well my opinion is more of linguistics, given the definitions:  

http://www.thefreedictionary.com/trait
http://www.thefreedictionary.com/use
http://www.thefreedictionary.com/with

Using 'with/within' keywords for a trait seem more natural and intuitive (at 
least as an English speaker). 

I can understand re-using existing keywords and why 'use' was ok but adding a 
'require' for traits just feels awkward (saying you can 'require' code or an 
interface for a trait).
I know someone's bound to say "you'll get used to it", fair enough. I'll add 
that Scala also uses 'with' for traits, so it's worth considering.

> 
> If you see the value in the abstract keyword in abstract classes or 
> moreover interfaces in general, I'd consider the value of this feature 
> equal.  Of course not everyone uses abstract classes or interfaces :D
>

I agree with what you're saying, a little hesitant to say of equal value since 
a lot of research has went into 'abstract' or 'interface' :)



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

Reply via email to