[Scilab-users] On parameters passing by name in scilab functions

Samuel Gougeon sgougeon at free.fr
Mon Feb 27 20:18:44 CET 2017


Le 27/02/2017 à 19:49, Tim Wescott a écrit :
> You misread my comments.  Tim _likes_ named parameters.  If Tim were on
> the C++ standards committee (which is as likely as pigs flying, BTW)
> Tim would agitate that named parameters be adopted into that language.
>   Scilab, Verilog, and (I think) VHDL have it, and particularly in a
> language that allows for optional parameters, I feel that when you have
> to have function calls with more than a few parameters it vastly aids
> code readability.
Sorry for my misinterpretation.
I agree that it is easier to use named parameters rather than to have to 
count and feed many "empty" or default positions to reach useful 
trailing ones. But when a parameter has been badly named when designing 
the function (*), then it is done and over. We must bear it all the 
time. And this is not nice at all.
Same thing when you want to add a parameter that has a meaning close to 
another already existing one. Then keeping things (names) clear may 
become hard. Moreover, things get more complicated when using varargin 
(that ignores names).

(*) this is often the case. Scilab misses a standards committee, also to 
well name things.




More information about the users mailing list