Roles in other languages?

In a few days, I'll be giving a talk on roles at DevTank. The audience will be developers (and business people) from many different language backgrounds. I've tried assessing state of the art for roles/traits in other languages, but am falling short. I just don't know other languages/cultures well enough.

I might add that I was disappointed to learn that Scala's traits are just mixins. I wonder how they came up with that name. Surely it wasn't just misunderstanding Smalltalk traits?

Update: As preparation for the talk, I've written a short language-agnostic introduction to traits/roles. I put that on my personal blog instead of this one as I don't want people to see the blog URL and dismiss it as just a "Perl" thing.

2 Comments

Hey,

Thanks for showing off the cross language version of roles/traits, I think it will be very useful to send around the office.

_john

It might be worth mentioning the term aspect-oriented programming, which seems pretty close to the same idea. I first came across this idea as workable code in the Java-based Spring framework, but as far as I could tell, it was then basically a hacky and complex way around making something like this work in Java. However, the fact that it was/is a key part of Spring is a solid knock-down argument against "nobody uses it".

Leave a comment

About Ovid

user-pic Freelance Perl/Testing/Agile consultant and trainer. See http://www.allaroundtheworld.fr/ for our services. If you have a problem with Perl, we will solve it for you. And don't forget to buy my book! http://www.amazon.com/Beginning-Perl-Curtis-Poe/dp/1118013840/