Re:A polyglot's guide to multiple dispatch – part 2
by raiph on Friday April 22, 2016 @08:41PM
(#11553529)
> Are basic operations like `+` generic in Perl 6?
Yes.
Re:A polyglot's guide to multiple dispatch – part 2
by StefanKarpinski on Monday April 25, 2016 @11:50AM
(#11565017)
Well, that's cool. Maybe Perl 6 will be the next good example of a multiple dispatch language.
Re:A polyglot's guide to multiple dispatch – part 2
by raiph on Tuesday April 26, 2016 @12:09AM
(#11569366)
I think I misunderstood your comment about CL vs Julia/Dylan in regard to generic "by default".
In Perl 6 this function definition implies a generic function:
multi concatenate (\foo, \bar) { foo ~ bar }
This function definition does not: sub concatenate (\foo, \bar) { foo ~ bar }
If one views the latter as the "default" (because it's two characters shorter and might be learned first) then Perl 6 has the same weakness, or at least the same default, as CL, compared to Julia and Dylan.
Both. Are basic operations like `+` generic in Perl 6?