-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Trying to match Julia syntax has some quirks that I think are worth documenting in some way, with maybe also a debug mode that warns when patterns that might not mean what they seem are used.
(*{args})
does not match a tuple,(*{args},)
does, so things like(*{args}) -> ...
could be warned against. Also,(*{args},) -> body
will not match(x) -> y
.(x...)
does match a tuple, so(a, b, (x...))
is suspicious and@metafunction f((args...)) = ...
and@metafunction f(args...) = ...
mean different things and either could not be what the author intended.@m x *{args}
matches@m x * {args}
, with*
unintentionally used in its binary form, same with
[x *{elements}]
. (maybe I should just change it to:*{args}
)f() = expr; *{exprs}
is the same as(f() = expr); *{exprs}
instead off() = (expr; *{exprs})
.
There are more probably, will add to the list if I remember.