Scratching the 40-Year Itch of Inheritance with Smalltalk-style Traits

Curtis Poe (
Location: Portland 256
Average rating: ****.
(4.07, 14 ratings)

When Simula 67 was introduced 40 years ago, modern OO was born. Unfortunately, though developers generally agree about classes, polymorphism and encapsulation, OO has always had a code smell due to four decades of disagreement over how to use inheritance. We’ll take a look at the debate and explain what the core problem is. Then we’ll solve is using Smalltalk-style traits, also known as “roles”.

Along the way, we’ll take a look at Java’s interfaces, Ruby’s mixins (well, they’re actually from a dialect of Lisp, but don’t tell anyone), scream in horror (and wonder) at Beta’s inheritance model and finally settle on Moose::Role, a robust trait implementation in Perl 5. Real-world examples from BBC code will be presented and along with descriptions of the problems we encountered along the way. Time permitting, we’ll also discuss future research into traits and some pitfalls developers may wish to be aware of.

Photo of Curtis Poe

Curtis Poe

Curtis “Ovid” Poe sits on the Board of Directors for The Perl Foundation and is a senior software engineer for the BBC. He has spoken at many conferences across the US and Europe, including OSCON. He’s one of the authors of the popular “Perl Hacks” book and has published articles in the Perl Review and on He also led the project to rewrite Perl’s venerable Test::Harness and is heavily involved in the current Perl renaissance.

  • Intel
  • Microsoft
  • Google
  • Facebook
  • Rackspace Hosting
  • (mt) Media Temple, Inc.
  • ActiveState
  • CommonPlaces
  • DB Relay
  • FireHost
  • GoDaddy
  • HP
  • HTSQL by Prometheus Research
  • Impetus Technologies Inc.
  • Infobright, Inc
  • JasperSoft
  • Kaltura
  • Marvell
  • Mashery
  • NorthScale, Inc.
  • Open Invention Network
  • OpSource
  • Oracle
  • Parallels
  • PayPal
  • Percona
  • Qualcomm Innovation Center, Inc.
  • Rhomobile
  • Schooner Information Technology
  • Silicon Mechanics
  • SourceGear
  • Symbian
  • VoltDB
  • WSO2
  • Linux Pro Magazine

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at

Download the OSCON Sponsor/Exhibitor Prospectus

Media Partner Opportunities

Download the Media & Promotional Partner Brochure (PDF) for information on trade opportunities with O'Reilly conferences or contact mediapartners@

Press and Media

For media-related inquiries, contact Maureen Jennings at

OSCON Newsletter

To stay abreast of conference news and to receive email notification when registration opens, please sign up for the OSCON Newsletter (login required)

OSCON 2.0 Ideas

Have an idea for OSCON to share?

Contact Us

View a complete list of OSCON contacts