Stefan Marr wrote:
Well, my personal (I admit very academic) position is:
- Traits are not classes
- Traits are not interfaces
- Traits are not types
- Traits cannot be instantiated
Thus, there is no meaning of a is_a and instanceof
+1
--
Sebastian Bergmann
Stefan Marr wrote:
On 25 Mar 2010, at 21:30, Stefan Marr wrote:
On 25 Mar 2010, at 16:37, Lukas Kahwe Smith wrote:
Hi,
this was just brought up on IRC. my understanding is that traits have no
concept of properties, but grafts do (all hidden internally). correct?
Right, the
On 26 Mar 2010, at 10:26, mathieu.suen wrote:
Variable has been discuss in *http://tinyurl.com/y9t7nd9
Right, and related to that we have freezable traits
http://scg.unibe.ch/scgbib?_k=NNRwidu5query=freezable+traitsdisplay=abstract
Which influenced this RFC for PHP:
Stefan Marr wrote:
On 26 Mar 2010, at 10:26, mathieu.suen wrote:
Variable has been discuss in *http://tinyurl.com/y9t7nd9
Right, and related to that we have freezable traits
http://scg.unibe.ch/scgbib?_k=NNRwidu5query=freezable+traitsdisplay=abstract
Which influenced this RFC for
Just as a general idea (which is certainly something after traits are
implemented once)
Scala offers stackable traits so that you can mixin traits during object
creation.
An example:
trait Philosophical {
public function think () {
echo Cogito ergo sum;
}
}
trait Drink {
On 25.03.2010, at 14:48, David Soria Parra wrote:
Just as a general idea (which is certainly something after traits are
implemented once)
Scala offers stackable traits so that you can mixin traits during object
creation.
An example:
trait Philosophical {
public function think ()
On 25 Mar 2010, at 16:00, Lukas Kahwe Smith wrote:
On 25.03.2010, at 14:48, David Soria Parra wrote:
This approach is taken in scala and works pretty fine there for composing
classes
during runtime and should be douable in PHP too. For sure aliasing is not
possible in this example.
But
Hi,
this was just brought up on IRC. my understanding is that traits have no
concept of properties, but grafts do (all hidden internally). correct?
regards,
Lukas Kahwe Smith
m...@pooteeweet.org
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Am 25.03.10 16:21, schrieb Stefan Marr:
On 25 Mar 2010, at 16:00, Lukas Kahwe Smith wrote:
On 25.03.2010, at 14:48, David Soria Parra wrote:
This approach is taken in scala and works pretty fine there for composing
classes
during runtime and
Hi
On Thu, Mar 25, 2010 at 4:00 PM, Lukas Kahwe Smith m...@pooteeweet.org wrote:
On 25.03.2010, at 14:48, David Soria Parra wrote:
Stefan what do you think about stackable traits ?
Woha .. that code really scares me.
While I like features like this in other languages, I think it would
be a
Hi,
On 24 Mar 2010, at 11:50, Lukas Kahwe Smith wrote:
In case of the above definition of Talker, PHP will show a warning that
there have been conflicts and name the methods smallTalk() and bigTalk() as
the reason of this conflict. Therefore, neither of the given implementations
will be
Hi:
On 24 Mar 2010, at 17:58, Jonathan Bond-Caron wrote:
One thing I feel is missing from the RFC is how is_a() and instanceof are
affected with traits or grafts.
Well, my personal (I admit very academic) position is:
- Traits are not classes
- Traits are not interfaces
- Traits are not
On 25 Mar 2010, at 16:37, Lukas Kahwe Smith wrote:
Hi,
this was just brought up on IRC. my understanding is that traits have no
concept of properties, but grafts do (all hidden internally). correct?
Right, the Traits proposal as it is at the moment, avoids the explicit
discussion of
On 25 Mar 2010, at 21:30, Stefan Marr wrote:
On 25 Mar 2010, at 16:37, Lukas Kahwe Smith wrote:
Hi,
this was just brought up on IRC. my understanding is that traits have no
concept of properties, but grafts do (all hidden internally). correct?
Right, the Traits proposal as it is at the
On 25.03.2010, at 21:13, Stefan Marr wrote:
On 24 Mar 2010, at 11:50, Lukas Kahwe Smith wrote:
In case of the above definition of Talker, PHP will show a warning that
there have been conflicts and name the methods smallTalk() and bigTalk() as
the reason of this conflict. Therefore, neither
On 25.03.2010, at 21:23, Stefan Marr wrote:
Hi:
On 24 Mar 2010, at 17:58, Jonathan Bond-Caron wrote:
One thing I feel is missing from the RFC is how is_a() and instanceof are
affected with traits or grafts.
Well, my personal (I admit very academic) position is:
- Traits are not classes
On 25.03.2010, at 22:59, Stefan Marr wrote:
On 25 Mar 2010, at 21:30, Stefan Marr wrote:
On 25 Mar 2010, at 16:37, Lukas Kahwe Smith wrote:
Hi,
this was just brought up on IRC. my understanding is that traits have no
concept of properties, but grafts do (all hidden internally).
Ahoi,
Thought it would be better to open up a new thread and also using the term
horizontal reuse in the subject so that we make it clearer that there are
actually two approaches. Here is the URL for Stefan's proposal:
http://wiki.php.net/rfc/horizontalreuse
In case of the above definition of
On Wed Mar 24 06:50 AM, Lukas Kahwe Smith wrote:
Ahoi,
Thought it would be better to open up a new thread and also using the
term horizontal reuse in the subject so that we make it clearer that
there are actually two approaches. Here is the URL for Stefan's
proposal:
On Wed Mar 24 06:50 AM, Lukas Kahwe Smith wrote:
The third sentence is not so clear to me, but if I guess it its also
just a typo as it makes more sense to me when replacing renaming to
result in renaming. But maybe you could tweak that paragraph to be a
bit clearer. For example its still
Hi Lukas,
Hi Jonathan:
Just a quick response on the renaming issue.
On 24 Mar 2010, at 18:04, Jonathan Bond-Caron wrote:
On Wed Mar 24 06:50 AM, Lukas Kahwe Smith wrote:
The third sentence is not so clear to me, but if I guess it its also
just a typo as it makes more sense to me when
21 matches
Mail list logo