aqua icon indicating copy to clipboard operation
aqua copied to clipboard

Omit function arguments with defaults

Open alari opened this issue 4 years ago • 1 comments

It's a very convenient pattern to have defaults for arguments.


func foo(arg: string = "hello")

foo()

foo("world")

alari avatar Sep 08 '21 11:09 alari

It would really help with upgradeability as well. E.g. adding a new API argument with type ?X can have = nil in its definition.

alari avatar Apr 25 '22 13:04 alari