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 & notation #37

Open
xarvh opened this issue Oct 20, 2024 · 4 comments
Open

Syntax & notation #37

xarvh opened this issue Oct 20, 2024 · 4 comments

Comments

@xarvh
Copy link
Owner

xarvh commented Oct 20, 2024

Following https://www.vidarholen.net/~vidar/An_Empirical_Investigation_into_Programming_Language_Syntax.pdf there is a case to use:

  • is in place of = for definitions

    • Pro: less confusion between = and ==
    • Con: more confusion between is and as (the formatter could accept both in record literals?)
  • not= in place of /=

@xarvh
Copy link
Owner Author

xarvh commented Oct 20, 2024

Should blocks have an explicit end?

  • In case of try..as, if..else, this could be useful

  • In case of function bodies, it would be a problem for one-liners and do-chains.

@xarvh
Copy link
Owner Author

xarvh commented Oct 20, 2024

Use any instead of _?

@xarvh
Copy link
Owner Author

xarvh commented Oct 20, 2024

if .. then
   ...
else if .. then
   ...
else
    ...
>> xx

Should apply xx to the whole else..if block

@xarvh
Copy link
Owner Author

xarvh commented Oct 21, 2024

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