seeking Traits or Typeclasses

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

seeking Traits or Typeclasses

Raoul Duke
hi,

i think inheritance in the java style sucks dirty buttocks more often
than not. i would like to be able to do something more compositional.
something perhaps akin to Traits in Scala, or Typeclasses in Haskell.
any thoughts? i'm googling, but haven't seen anything for haxe yet...

thanks!

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: seeking Traits or Typeclasses

Raoul Duke
p.s. the "using" thing i don't really like either, based on my
experience with it in C#. the fact that it is just mostly sugar for
static methods means it is lame because of visibility etc., it ends up
being a very leaky abstraction.

On Wed, Dec 21, 2011 at 12:41 PM, Raoul Duke <[hidden email]> wrote:
> hi,
>
> i think inheritance in the java style sucks dirty buttocks more often
> than not. i would like to be able to do something more compositional.
> something perhaps akin to Traits in Scala, or Typeclasses in Haskell.
> any thoughts? i'm googling, but haven't seen anything for haxe yet...
>
> thanks!

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: seeking Traits or Typeclasses

Juraj Kirchheim
In reply to this post by Raoul Duke
You might want to check out Tinkerbell's syntactic delegation:
https://github.com/back2dos/tinkerbell/wiki/Tink-Class-Declaration#wiki-delegation

On Wed, Dec 21, 2011 at 9:41 PM, Raoul Duke <[hidden email]> wrote:

> hi,
>
> i think inheritance in the java style sucks dirty buttocks more often
> than not. i would like to be able to do something more compositional.
> something perhaps akin to Traits in Scala, or Typeclasses in Haskell.
> any thoughts? i'm googling, but haven't seen anything for haxe yet...
>
> thanks!
>
> --
> haXe - an open source web programming language
> http://haxe.org

--
haXe - an open source web programming language
http://haxe.org
Loading...