Pretty please: Named arguments
spir
denis.spir at gmail.com
Tue Mar 1 03:29:35 PST 2011
On 03/01/2011 01:03 AM, Jonathan M Davis wrote:
> From the perspective
> of the library user, it does provide some benefit, but I honestly do not think
> that
>
> func(x : 4, y : 5);
>
> is easier to read than
>
> func(4, 5);
>
> Sure, you have to know what func's parameters are, but you have to know that
> anyway. Only now, with named arguments, you have to care about what their
> _names_ are in addition to what they're for. I do _not_ want to have to read
> code which uses named arguments. It's just more clutter and more intellectual
> overhead.
Sorry no, you don't *have* to. Nothing forces you to use them.
And again named params are a help for /reading/. You & Don argue on a wrong
basis, as if (1) they were forced on writing (2) they were supposed to be a
feature at writing time.
Even you who don't want it would benefit from them at times: on the opposite of
what you say above, named params /remove/ intellectual/memory load from
programmers' minds/brains.
[It's like a fight against pocket calculators or the use of an encyclopedia to
write a University thesis. (People should compute by hand and know all facts by
heart.)]
Denis
--
_________________
vita es estrany
spir.wikidot.com
More information about the Digitalmars-d
mailing list