YAPC::Asia 2009

(Parameterized) Roles

スピーカー Shawn Moore (‎sartak‎) 応募者 Tsukuba.pm
日付: 2009/09/11 14:20
期間: 40 分
言語: English
タグ: moose moosex parameterized role roles

詳細はスピーカーのサイトをご覧ください:


Roles are an excellent object-oriented tool both for allomorphism and for reuse.

Roles facilitate allomorphism by favoring "does this object do X" versus "is this object a subclass of X". You often care more about capability than inheritance. In a sense, roles encode types better than inheritance.

Roles also provide an excellent faculty for reuse. This effectively eliminates multiple inheritance, which is often the only solution for sharing code between unrelated classes.

Roles can combine with conflict detection. This eliminates accidental shadowing of methods that is painful with multiple inheritance and mixins.

Parameterized roles (via MooseX::Role::Parameterized) improve the reusability of roles by letting each consumer cater the role to its needs. This does sacrifice some allomorphism, but there are ways to restore it.

Attended by:

Sponsors

主催

YAPC Sponsors

  • O'Reilly Japan
  • Contents One
  • Six Apart
  • Booking.com
  • Fractalist
  • 募集中

Media Sponsors (50音順)

  • @IT
  • O'Reilly Japan
  • gihyo.jp
  • Shoeisha
  • 募集中

JPA Platinum Sponsors

  • S2 Factory
  • endeworks
  • GaiaX
  • DeNA
  • mixi
  • livedoor

JPA Gold Sponsors

JPA Silver Sponsors

  • Adjust
  • ADWAYS CO., LTD.
  • Intfloat
  • KDDI Web Communications
  • Seesaa Co. Inc.
  • Six Apart
  • Paperboy & co
  • Plugin and Core
  • Mobile Factory

JPA Bronze Sponsors

  • Soffritto
  • wadit