Home > Uncategorized > Roles (or Traits) in other languages

Roles (or Traits) in other languages

I’m no expert on languages, but I think there are only two other languages (besides Perl) thay have mature and widely used implementations of roles – Scala, which has native support, and JavaScript, which has support via Joose.

There seem to be some projects around for Ruby, Java and possibly Python. But I don’t think they’re recommended as a best practice (yet). It’ll be interesting to see if other languages begin to catch on, and whether they’re at all influenced by Moose or Perl 6. Anyone know of other languages that have roles?

Advertisements
Categories: Uncategorized Tags:
  1. June 16, 2009 at 1:47 pm

    Smalltalk of course (http://scg.unibe.ch/research/traits) it is where we all stole the idea from.

    • Mutant
      June 16, 2009 at 1:51 pm

      Whoops, knew I’d forget something obvious. Thanks.

      Do you know if it’s something widely used in Smalltalk?

      • June 16, 2009 at 4:38 pm

        No, I don’t think there is much traction in the Smalltalk community with them. It seem that we (the perl community) are the only ones actively using them.

    • June 16, 2009 at 7:10 pm

      I wouldn’t say “stole” the idea — but I certainly did borrow their formalism for talking about what I’d been working on for a couple of years. Call it convergent invention.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: