A short while ago there was a discussion about implementing Traits in
the next PHP version. How is the status of this?
Hi:
A short while ago there was a discussion about implementing Traits in
the next PHP version. How is the status of this?
The code is committed to trunk, and thanks to the community there have already been some improvements and fixes for corner cases.
We even got some basic reflection capabilities, too.
So, it is there. Now it is just a matter of defining a release and either including it or not...
Best regards
Stefan
PS: Snapshots are here http://snaps.php.net/
That sounds good and I hope it will be included in the next release.
Best regards,
Christian
Hi:
A short while ago there was a discussion about implementing Traits in
the next PHP version. How is the status of this?The code is committed to trunk, and thanks to the community there have already been some improvements and fixes for corner cases.
We even got some basic reflection capabilities, too.So, it is there. Now it is just a matter of defining a release and either including it or not...
Best regards
StefanPS: Snapshots are here http://snaps.php.net/
What was the status of data for traits in the implementation that went
into trunk?
Would one have to do that by creating public properties that aren't
formally defined?
On Fri, Jun 4, 2010 at 8:13 AM, Christian Kaps
christian.kaps@mohiva.com wrote:
That sounds good and I hope it will be included in the next release.
Best regards,
ChristianHi:
A short while ago there was a discussion about implementing Traits in
the next PHP version. How is the status of this?The code is committed to trunk, and thanks to the community there have already been some improvements and fixes for corner cases.
We even got some basic reflection capabilities, too.So, it is there. Now it is just a matter of defining a release and either including it or not...
Best regards
StefanPS: Snapshots are here http://snaps.php.net/
--
--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com
Hi Tom:
The status is still identical to what the RFC says + some extensions to the reflection API.
Thus, you can define properties in Traits just like in classes, and I would encourage you to do so, if that is the way you use PHP. However, there is no conflict detection with other traits. Thus, you have to make sure that your property names are descriptive and unique over all traits you combine.
Finding a solution for that problem wasn't possible so far. At least not in a way that makes people happy i.e. avoids tons of complex and rather academic constructs to ensure that you get what you want with respect to state.
Hope that helps
Best regards
Stefan
What was the status of data for traits in the implementation that went
into trunk?Would one have to do that by creating public properties that aren't
formally defined?On Fri, Jun 4, 2010 at 8:13 AM, Christian Kaps
christian.kaps@mohiva.com wrote:That sounds good and I hope it will be included in the next release.
Best regards,
ChristianHi:
A short while ago there was a discussion about implementing Traits in
the next PHP version. How is the status of this?The code is committed to trunk, and thanks to the community there have already been some improvements and fixes for corner cases.
We even got some basic reflection capabilities, too.So, it is there. Now it is just a matter of defining a release and either including it or not...
Best regards
StefanPS: Snapshots are here http://snaps.php.net/
--
--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com--
--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax: +32 2 629 3525