develooper Front page | perl.perl6.language | Postings from July 2005

MMD handling (was Re: Hackathon notes)

Thread Previous | Thread Next
From:
David Storrs
Date:
July 8, 2005 13:48
Subject:
MMD handling (was Re: Hackathon notes)
Message ID:
23991489-8E79-4809-9C42-22F887536CAE@dstorrs.com

First off, it seems like there are at least 3 topics being discussed  
under the "Re: Hackathon notes" subject line.  Could we break them  
out into separate threads so that our poor summarizer doesn't go  
bonkers?


On Jul 8, 2005, at 4:25 PM, Dave Whipp wrote:

> Rod Adams wrote:
>
>
>>    multi method foo#bar (Num x) {...}
>>    multi method foo#fiz (String x) {...}
>>    $y = 42;
>>    $obj.foo#fiz($y); # even though $y looks like a Num
>>    $obj.foo($z);     # let MMD sort it out.
>>


Instead of changing the parse rules for #, why not just use a trait?

     multi method foo is short_name('bar') {...}


> Having additional tags might also give us something to hang  
> priority traits off: "foo#bar is more_specific_than(foo#baz);"  
> might influence the order of clauses in the implicit given/when  
> block. It feels like there should be a generalization of operator  
> precidence here (even thought he two are superficially dis-similar,  
> the looser/tighter concept appears valid).

Although I like the idea of reusing this concept, I'm not sure that  
it really solves the problem.  Fundamentally, we're trying to make  
MMD behave intuitively with no programmer effort.

--Dks



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About