[swift-evolution] Why doesn't Swift allow a variable and a function with the same name?
jtbandes at gmail.com
Mon Jan 30 21:56:45 CST 2017
You said "The ability to reference a function by only the first segment of
its name is likewise legacy of the original model..." — how else could you
refer to a nullary function? Even if labels were required for naming
(>0)-ary functions, there's still ambiguity between a nullary function and
On Mon, Jan 30, 2017 at 7:54 PM Joe Groff <jgroff at apple.com> wrote:
> > On Jan 30, 2017, at 7:34 PM, Jacob Bandes-Storch <jtbandes at gmail.com>
> > Although there's no spelling for this...
> IMO, the way to spell `foo` with no arguments is just `foo`. If we
> strictly required the labels for referring to n-ary functions, that would
> make it unambiguous…
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution