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

Simplify Gypsum syntax #44

Open
jayconrod opened this issue Feb 25, 2017 · 0 comments
Open

Simplify Gypsum syntax #44

jayconrod opened this issue Feb 25, 2017 · 0 comments

Comments

@jayconrod
Copy link
Owner

Gypsum has a lot of "magic" syntax -- things that seem simple to write (as long as you know how to write them), but are fairly ambiguous and are difficult to compile. It can be annoyingly difficult and unintuitive to fix syntax errors.

Lots of issues off the top of my head:

  • Layout analysis is too magical. I hate having braces and semicolons all over the place, but Python does a much better job interpreting indentation as blocks.
  • Gypsum classes are difficult to write because so much stuff needs to go on the first line. It's hard to break the lines in a way that satisfies layout analysis and makes sense.
  • Function and method calls without explicit argument lists are confusing. I'm trying to be too much like Scala here.
  • Function definitions should have an explicit parameter list, even if it's empty, to match calls.
  • Lambdas look weird if they don't have an explicit parameter list.
  • Parenthesized expressions may need to be treated differently by the compiler. This should be reflected in the AST. For example, a.b() should be interpreted as a method call or a closure call (depending on what b is), but (a.b)() is definitely a closure call.
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