The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Traits? Nah

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Daniel Berger

Posts: 1383
Nickname: djberg96
Registered: Sep, 2004

Daniel Berger is a Ruby Programmer who also dabbles in C and Perl
Traits? Nah Posted: May 23, 2007 2:11 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Daniel Berger.
Original Post: Traits? Nah
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Daniel Berger
Latest Posts From Testing 1,2,3...

Advertisement
From Avi Bryant, on the Seaside mailing list:

...nobody who uses Seaside in production is
seriously proposing that we make it depend on Traits - as far as I
know, nobody uses Traits in production, period.

Ouch.

To be fair, there are a couple people who apparently do use traits in the Smalltalk world, but very few. When I searched the comp.lang.smalltalk archives I found 47 hits, all of which were more or less academic conversations on traits, their possible use and their potential usefulness, but no actual use cases. I honestly can't tell if, among those that like the idea, they want traits merely for the mixin capability or for the honest to goodness composition.

That, of course, makes me wonder why they decided to implement traits (aka roles) in Perl 6 without any real community feedback or use cases. There's no discussion on comp.lang.perl.misc about them. Only members of the Perl 6 core team seem to be excited by them as far as I can tell. Others either don't seem to know about them or are nonplussed.

I mean, given that the concept of traits have been around for 4 years now, and even Smalltalkers can't find a use for them, don't you have to wonder if they're really worth it?

In any case, my feeling (these days) is that the interface aspect of traits should only be used in static languages, such as Scala, which lacks any other sort of mixin mechanism (that I'm aware of). Enforcing that element in a dynamic language amounts to a form of static typing, and with the same result - you'll end up with brittle code.

As for the multi-mixin "problem" in Ruby, well, that was solved here.

Read: Traits? Nah

Topic: Agile Artisans: My New Website Previous Topic   Next Topic Topic: RailsConf ‘07 wrap up

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use