PRE-PROPOSAL: Named method parameters with defaults.
develop4lasu at gmail.com
Sun Mar 22 16:36:23 PDT 2009
- in notation suggested by you, compilator and people may find problem
with determining valid method signature (when we have few methods with
Same as now time:
void a(Boo boo);
void a(String booName);
now imagine that Boo is generic ...
- when some one would change default value (how already compiled code
should react?), that why i think that values should be stored on
special static fields.
2. Some solution could bring keeping parameter blank for default value:
foo(,"bar"); // first is default;
foo("bar",); // second is default;
If you think that this can replace builders, then in my opinion you are wrong.
When class need so many parameters, so it become problem to list them
in proper order, then obtaining those data is also problem, so even if
we will have named parameters 'generally' problem will do not
I found it while I created some library:
It become common for peoples that while it was hard for them to
collect all data at once they produces their own builders, so at end,
to many parameters mean that in each dependent project someone will
create it's own builder, and it's no mater, if they will be able to
call parameters by names, or not.
Pozdrowionka. / Regards.
Lasu aka Marek Kozieł
More information about the coin-dev