There's More Than One Way To Dispatch It
Av Jonathan Worthington (jnthn) fra Bratislava.pm
Dato: fredag 17 april 2009 13.30
Varighet: 45 minutter
Målgruppe: Videregående
Språk: English
Tagger: 6 multidispatch perl
Multiple dispatch allows you to write many subroutines or methods with the same name, but taking a different number of or different types of parameters. In this talk I will look at multiple dispatch in Perl 6, including:
* How to write multi dispatch subs
* Arity based dispatch
* Basic type-based dispatch
* Candidate sorting - how the winner is chosen in a more complex type hierarchy
* Using subset types to do multiple dispatch on values
* Handling ambiguity: the 'is default' trait and using a proto as a fallback
* The .?, .+ and .* operators
All illustrated with example code, which runs today in Rakudo.
- Salve J. Nilsen (sjn)
- Gabor Szabo (szabgab)
- Geir Aalberg (geira)
- Carl Mäsak (masak)
- Håkon Karlsen (haakonsk)
- Tore Haugland
- jani
- Dag Lem (dlem)
- Frank Mortensen (FAM)
- Jonathan Worthington (jnthn)
- Florian Ragwitz (rafl)
- Erik Johansen (uniejo)
- Jeremiah Foster (jeremiah)
- Martin Kjeldsen (baest)
- Patrick Michaud (Pm)
- Marcel Grünauer (hanekomu)
- Stefan Hornburg (racke)
- Edoardo Sabadelli (viking-3)
- Kirill Miazine
- Max Muzi (Maxim)
- Andreas Parslow
- Leif Egil Olsen