Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax quirks: documentation & debug mode #49

Open
fcard opened this issue Sep 14, 2017 · 0 comments
Open

Syntax quirks: documentation & debug mode #49

fcard opened this issue Sep 14, 2017 · 0 comments

Comments

@fcard
Copy link
Owner

fcard commented Sep 14, 2017

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 of
    f() = (expr; *{exprs}).

There are more probably, will add to the list if I remember.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant