Named parameters: Difference between revisions

Content added Content deleted
mNo edit summary
Line 2,096: Line 2,096:


=={{header|V (Vlang)}}==
=={{header|V (Vlang)}}==
1) Vlang allows for struct a literal to be passed to the function, instead of named parameters.
1) Vlang allows for a struct literal to be passed to the function, instead of named parameters.


2) Using this style, fields need not appear in the same order as they are declared
2) Using this style, fields need not appear in the same order as they are declared.


3) If one or more are omitted, their default values will be used instead.
3) If one or more fields are omitted, their default values will be used instead.


4) The named parameter feature was deliberately omitted, for greater code readability.
4) The named parameter feature was deliberately omitted, for greater code readability.