Pretty please: Named arguments

Jason E. Aten j.e.aten at gmail.com
Wed Mar 2 07:06:17 PST 2011


On Wed, Mar 2, 2011 at 8:45 AM, Jim <bitcirkel at yahoo.com> wrote:
>
> In addition to that, named template arguments would allow you to create
> very customizable, yet lean types. It would be possible to parameterize all
> components. Basically, if you're not pleased with the default search
> algorithm or container type of a more complex object then you can specify
> your own.
>

Interesting, I hadn't considered the benefits of template arguments with
names as far as leanness of types.

The best part of naming arguments for functions and methods, in my
experience, is that if you add additional arguments to a method, it is a
cheap change. I don't have to go and find and change all the client calls
that have already been written. I can leave all of the existing source with
client code untouched, and only specify the new parameter in the new
invocation that wants to use the new functionality.  I only have to
recompile.  Low maintenance.  Nice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110302/90a576e6/attachment.html>


More information about the Digitalmars-d mailing list