So what I recall I saw was the usage of super in "with" chained traits.

http://books.google.com/books?id=MFjNhTjeQKkC&pg=PA228&lpg=PA228&dq=scala+super+trait&source=bl&ots=FLmh-MMSvn&sig=tOnH2GbH6McsgorhmUQjNGkVBeY&hl=en&ei=ZeVRToq8OonLrQeMmqX6DQ&sa=X&oi=book_result&ct=result&resnum=2&ved=0CBsQ6AEwATgK#v=onepage&q=scala%20super%20trait&f=false

class Animal
trait Furry extends Animal
trait HasLegs extends Animal
trait FourLegged extends HasLegs
class Cat extends Animal with Furry with FourLegged


The "super" keyword called within the traits is compiler special and
will follow the 'with' links as well as the inheritence...


Cheers
Niclas

On Mon, Aug 22, 2011 at 12:51 PM, Niclas Hedhman <[email protected]> wrote:
> On Mon, Aug 22, 2011 at 10:51 AM, Rickard Öberg <[email protected]> 
> wrote:
>>> IIUIC, Scala traits are subclassed like that, but "next" is done via
>>> "super" which is handled by the compiler to be the next in chain.
>>
>> No, traits gets converted to static methods with first parameter being the
>> object that is "treated".
>
> We might be talking about different things. I'll pull up what I mean later...
>
>
> Cheers
> --
> Niclas Hedhman, Software Developer
> http://www.qi4j.org - New Energy for Java
>
> I live here; http://tinyurl.com/3xugrbk
> I work here; http://tinyurl.com/24svnvk
> I relax here; http://tinyurl.com/2cgsug
>



-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/24svnvk
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to