Perl 6 Roles In Depth

Perl 6 Roles In Depth

By Jonathan Worthington (‎jnthn‎) from Prague.pm
Date: Tuesday, 4 August 2009 14:45
Duration: 40 minutes
Target audience: Everyday Perl
Language:
Tags: mixins perl6 rakudo roles traits


By the time YAPC::Europe 2009 comes around, Rakudo Perl 6 will have a complete - or very close to complete - implementation of roles, a part of the object model focused on enabling software re-use.

I'll start off by giving a basic introduction to writing roles and composing them in to classes. Then we'll dive in to the juicy stuff:

* Parametric roles - how to get more re-use out of roles by parameterizing them with types and values
* The relationship between roles, sigils and typed data arrays and hashes
* Traits - roles applied at compile time to containers
* Runtime mix-ins - how to add extra behavior on a per-object basis and how to use this to provide context-sensitive return values


Attended by: Patrick Michaud (‎Pm‎), Piers Cawley (‎pdcawley‎), Pedro Figueiredo (‎pfig‎), Luciano Rocha (‎Strange‎), Martin Schipany (‎ElCondor‎), Pedro Frazão, Cláudio Valente, Steffen Schwigon (‎renormalist‎), Damian Conway (‎damian‎), Jonathan Worthington (‎jnthn‎), Panu Ervamaa (‎pnu‎), Pedro Melo (‎melo‎), Curtis Poe (‎Ovid‎), Frederico Recsky (‎Frederico‎), Clinton Gormley (‎DrTech‎), Jose Celestino (‎japc‎), Jordi Porta, James Laver (‎jjl‎), Bernhard Schmalhofer (‎bernhard‎), Michele Beltrame (‎arthas‎), oleber, Roman Baumer (‎rba‎), Carlos Pires (‎acmpires‎), Jozef Kutej (‎jozef‎), Bálint Szilakszi (‎szbalint‎), Gianni Ceccarelli (‎dakkar‎), Arjen Laarhoven, João Carreira, Mark Morgan, Aristotle, Rosellyne Worrall (‎rozallin‎), Salvador Fandiño (‎salva‎), Michael Zedeler (‎mzedeler‎), Jorge Bras, Filipe Moreira, Henrik Tougaard (‎htoug‎), Jose L. Hernandez, David Faux, Stefano Rodighiero (‎larsen‎), Pedro Rodrigues (‎careca‎), Wendy Van Dijk (‎woolfy‎), Stan Sawa, Elizabeth Mattijsen (‎liz‎), Joerg Meltzer (‎codeacrobat‎), Michael Langner, Daan Baldewijns, Bogdan Lucaciu (‎zamolxes‎), jani, Gabor Szabo (‎szabgab‎), Alexandru Nedelcu, Philippe Bruhat (‎BooK‎), Carl Mäsak (‎masak‎), Damon Davison (‎allolex‎), Markus Pinkert (‎Bedivere‎), Adrian Arnautu, Darius Jokilehto, Markus Wichmann (‎telemorphix‎), Lars Holgaard, Drew Taylor (‎drewbie‎), Manuel Gomes (‎wagemage‎), Bartosz Jakubski (‎migo‎), Sérgio Bernardino (‎smpb‎), Tobias Henoeckl (‎hoeni‎), Tobias Kremer (‎soulchild‎), Smylers, Thomas Netousek, Enrique J Hernandez Blasco (‎sixstone‎), Christian Westgaard (‎ComLock‎), David Leadbeater (‎dg‎), Jose Plana, Jørgen Elgaard Larsen (‎elhaard‎), Fernando Vezzosi (‎Bucciarati‎), Ruslan Zakirov (‎ruz‎), Sergio Arias, geira,