Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Re: Data struct...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 9 Topic 2359 of 2474
Post > Topic >>

Re: Data structures for efficient overload resolution

by Steve Horne <stephenhorne100@[EMAIL PROTECTED] > Mar 18, 2008 at 07:23 AM

On Mar 18, 12:07 am, Chris Dodd <cd...@[EMAIL PROTECTED]
> wrote:

> The usual way to do this is to compare each function against the list
> of best matches for each argument irrespective of which function they
> came from.  That way you get O(nm) complexity in the number of
> candidates and number of arguments.  So after looking at #2, you'll
> have (c, c) as your best match argument types and no function that
> matches it.  #3 will then match.

Interesting. If I'm reading correctly, you're basically saying that
for the candidate to be an unambiguous best match, all parameters must
have the best match types. Otherwise, the candidate is either one of
several ambiguous matches or incompatible.

Based on this, the resolution process wouldn't know the difference
between an unmatched call and an ambiguous call, and it wouldn't be
able to list the valid candidates for ambiguous cases, but it would
handle correct cases correctly and detect all errors. When an error is
found, error re****ts can be based on an alternative resolution process
- keeping the main resolution process efficient.

I like it.
 




 9 Posts in Topic:
Data structures for efficient overload resolution
Steve Horne <stephenho  2008-03-11 16:35:50 
Re: Data structures for efficient overload resolution
Barry Kelly <barry.j.k  2008-03-14 14:42:33 
Re: Data structures for efficient overload resolution
Steve Horne <stephenho  2008-03-15 13:36:19 
Re: Data structures for efficient overload resolution
Barry Kelly <barry.j.k  2008-03-17 14:44:26 
Re: Data structures for efficient overload resolution
Steve Horne <stephenho  2008-03-18 07:07:52 
Re: Data structures for efficient overload resolution
Chris Dodd <cdodd@[EMA  2008-03-17 19:07:49 
Re: Data structures for efficient overload resolution
Steve Horne <stephenho  2008-03-18 07:23:56 
Re: Data structures for efficient overload resolution
George Neuner <gneuner  2008-03-18 21:46:51 
Re: Data structures for efficient overload resolution
Steve Horne <stephenho  2008-03-22 18:53:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 1:11:53 CDT 2008.