August 2010 Archives

Age discrimination in Perl 6 using subsets and multiple dispatch

I recently read a blog post by Alex Miller about Clojure multi-methods.

It described and answered a question his friend had asked him, as well as discussing some related problems. I'm going to showcase the different options Perl 6 provides for solving these same problems. Here's the initial question:

Is it possible to write a multimethod that has defmethods which handle ranges of values? For example, say that a person has an age. Can I write a multimethod that accepts a person as a parameter an…

About Tyler Curtis

user-pic I write about Perl 6; I write in Perl 6; and I try to write Perl 6.