Pretty please: Named arguments

Russel Winder russel at russel.org.uk
Mon Feb 28 04:04:55 PST 2011


On Sun, 2011-02-27 at 23:40 -0800, Bekenn wrote:
> On 2/27/2011 11:32 PM, Russel Winder wrote:
> > The Python mechanism relies on the fact that despatch is by name and not
> > by signature.  Languages that dispatch by signature will have
> > significantly greater problems!
> >
> 
> I don't follow; the compiler has to look up the correct function 
> signature whether you use named arguments or not.  How is this 
> significantly different?

In C, C++ and D yes, in Python despatch is only by function name, not by
signature -- exactly because of the parameter passing mechanism.

Put it another way, Python does not have function overloading.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110228/b14276e5/attachment.pgp>


More information about the Digitalmars-d mailing list