My Stuff
Love
Respect
Admiration
My Amps
Links
Archives


Add this feed to a running copy of BottomFeeder

Linux World 2006 Speaker

Thursday, October 30, 2003

 
Article On Using Traits On Smalltalk's Collection Classes

If you don't know what traits are, read this excellent article. It's a great introduction to them and provides an example on how (and ultimately why) to use them. Basically, they are an elegant solution to the inheritance problem. I generally tend to favor composition over inheritance, but traits allow you to have your composition with the convience that inheritance gives you. It's amazingly simple and makes perfect sense. Much like most good technology, you don't have to think too hard about it. Go read the article and prepare yourself to say, "WOW!" There is a package on SqueakMap with a simple implementation of traits in Squeak. I also think traits would be pretty easy to implement in JavaScript and Ruby. Yet another reason to pick dynamic languages, they change to you and not the other way around...=)

Comments




Metalheads Against Racism



This page is powered by Blogger. Isn't yours?