Perl 6 Roles In Depth

Perl 6 Roles In Depth

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