22.02.2014 Views

Please, feel free to interrupt me at any time. - Stefan-Marr.de

Please, feel free to interrupt me at any time. - Stefan-Marr.de

Please, feel free to interrupt me at any time. - Stefan-Marr.de

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A Comparison<br />

Traits<br />

• Purpose, reuse of<br />

– behavior<br />

• Fe<strong>at</strong>ures<br />

– St<strong>at</strong>eless<br />

– Fl<strong>at</strong>tenable<br />

– Explicit conflict resolution<br />

– Highly composable<br />

• Notion<br />

– Language‐base<br />

Copy and Paste<br />

Grafts<br />

• Purpose, reuse of<br />

– modules smaller then classes<br />

• Fe<strong>at</strong>ures<br />

– St<strong>at</strong>eful<br />

– Hi<strong>de</strong>s complexity<br />

– Conflict avoidiance<br />

– Strong encapsul<strong>at</strong>ion<br />

• Notion<br />

– Deleg<strong>at</strong>ion with selfimperson<strong>at</strong>ion<br />

4/26/2008 3. Traits for PHP: Trait versus Graft<br />

18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!