On Mon, 25 Jan 2016 12:56:01 +0000, arturg wrote: > On Monday, 25 January 2016 at 08:55:55 UTC, Jacob Carlborg wrote: >> On 2016-01-24 19:23, Chris Wright wrote: >> >>> It shouldn't. However, it is another way to pass function arguments, >>> so for thoroughness it would be better to mention it. >> >> Added an example. >> >>> Is this what you intended? If so, please document it so other >>> reviewers don't have to wonder. >> >> Added an example. > > hi, named args is mainly a feature for the caller, is it really > necessary to add a new syntax to the function definition? besides making > some args part of the api and some not.
Python, C#, Scala, and Ada do not require any special annotations at the function definition to use named arguments. Dart and Ruby do. Obviously it's not necessary, but there is precedent both ways. > this feature is nothing more then a comment and the simplest way to > implement this, is to add a single word comment type which might be > usefull in more situations. It's a comment that the compiler verifies. You could argue that the bulk of the type system is comments that the compiler verifies.