> > > > I'd like to start a discussion on an RFC to allow defining constants in > traits. > > https://wiki.php.net/rfc/constants_in_traits > > > > I'm looking forward to your feedback, including corrections on English > wordings. > > > > Thanks! > > > > -- > > Shinji Igarashi > > I am initially lukewarm. One thing not addressed in the RFC that should > be: Why were constants left out of traits previously, and what has changed > to make them make sense to include now? (I don't recall, honestly, so I > have no strong feelings one way or the other yet.) >
That! I'm also wondering why the default value of a const (and a property) could not be changed by the class importing the trait? This sometimes hits me and the original RFC doesn't explain why this is needed. I added Stefan Marr in the loop in case he still checks this email address and would like to shed some light on those questions. WDYT Stefan? And I'd also be happy to see an implementation of this before voting, to be sure this is something that can be achieved without too many troubles. Do you think this is possible? Cheers, Nicolas