On Monday, June 9, 2003, at 07:13 AM, Adam Turoff wrote:
On Mon, Jun 09, 2003 at 01:26:22PM +0100, Piers Cawley wrote:
Assuming I'm not misunderstanding what Adam is after, this has come up
before (I think I asked about value based dispatch a few months back)
and I can't remember if the decision was that MMD didn't extend to
dispatching based on value, or if that decision hasn't been taken yet.
If it's not been taken, I still want to be able to do


       multi factorial (0) { 1 }
       multi factorial ($n) { $n * factorial($n - 1) }


The most recent semi-official opinion given onlist, AFAIK, was from Damian on 3/13/03:


On Thursday, March 13, 2003, at 06:15 PM, Damian Conway wrote:
Piers Cawley wrote:
Speaking of multis and constants, Greg McCarroll wondered on IRC if
this would work:
    multi factorial (Int 0) { 1 }
    multi factorial (Int $n) { $n * factorial($n-1) }

Probably not. We did discuss whether multimethods should be able to be overloaded by value, but concluded (for that week, at least ;-) that this might prove syntactically excessive.

See the rest of his message for a marginally scary workaround.


MikeL



Reply via email to