PRE-PROPOSAL: Named method parameters with defaults. (original) (raw)

Marek Kozieł develop4lasu at gmail.com
Sun Mar 22 16:36:23 PDT 2009


  1. Problems:
  1. Some solution could bring keeping parameter blank for default value: foo(,"bar"); // first is default; foo("bar",); // second is default;

  2. Genesis 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 decrease. 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ł

http://lasu2string.blogspot.com/



More information about the coin-dev mailing list