Associative parameters

Greg greg at gmail.com
Tue Jul 10 04:50:50 PDT 2007


Walter Wrote:

> 
> "Sefan Zobel" <Sefan_member at pathlink.com> wrote in message
> news:d9n5i9$aad$1 at digitaldaemon.com...
> > In article <d9lnrr$26q3$1 at digitaldaemon.com>, Chris Sauls says...
> > > In python, you would do something like this:
> > >
> > ># foo (
> > >#   x = someX ,
> > >#   y = someY ,
> > >#   z = someZ
> > >#   )
> > >
> > >Now isn't that just nifty?
> >
> >
> > This is also called "named parameters" in some languages (since parameters
> > are resolved by name, not by position). And, yes, I like it too :)
> 
> Named parameters are problematic when overloading is thrown into the mix.
> 
> 
What is problematic? I used named parameters with Ada and I'm not aware of any problems with it.
In addition to making the code easier to read, named parameters avoid the burden of creating "dummy" functions when some parameters are optional.
I found nothing on the net telling that python's or ada's implementation of named parameters is problematic.
Can someone confirm/infirm on this point?




More information about the Digitalmars-d mailing list