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

Alternate syntax #3

Closed
yuxshao opened this issue Nov 3, 2017 · 1 comment
Closed

Alternate syntax #3

yuxshao opened this issue Nov 3, 2017 · 1 comment

Comments

@yuxshao
Copy link
Owner

yuxshao commented Nov 3, 2017

What do you guys think about the following changes?

  • Event declaration: event create(...) { ... } instead of CREATE(...) { ... }
    • Additionally, allow function definitions in objects. (So events are really just the same as void-returning functions, possibly taking arguments in the case of create - but I think it's good to have distinction visible in the code)
  • Game object type declaration: object Player { ... } instead of player { ... }
  • Creation and destruction: e.g. p = create Player(...); and destroy p instead of create(Player) and destroy(p).

All three changes make things just slightly easier to parse. Do any of them look worse in your opinions?

@yuxshao
Copy link
Owner Author

yuxshao commented Nov 8, 2017

FYI create Player and destroy p are the current ways to do things.

@yuxshao yuxshao mentioned this issue Nov 8, 2017
2 tasks
@yuxshao yuxshao closed this as completed Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant