Syntax Surprises

Speaking of excess parentheses, there’s various places these are allowed and I have very mixed feelings about. An extreme example with juxtaposition

julia> (((((((6)))))))(((((((7)))))))
42

And a fun one with keyword argument syntax

julia> f(;kws...) = kws
f (generic function with 1 method)

julia> f(a=1)  # ok sure
pairs(::NamedTuple) with 1 entry:
  :a => 1

julia> f(((((((((a=1))))))))) # now what?
pairs(::NamedTuple) with 1 entry:
  :a => 1
1 Like