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

Add a FAQ page #23

Open
C-Ezra-M opened this issue Jun 25, 2023 · 1 comment
Open

Add a FAQ page #23

C-Ezra-M opened this issue Jun 25, 2023 · 1 comment

Comments

@C-Ezra-M
Copy link

Having a FAQ page makes it easy for people to answer their common Rhai why's. The structure should at least partially replicate that of the Python FAQ.

An example question for the design section could look like this:

Why does Rhai require semicolons?

You probably can expect us to not enforce semicolons at the end of every statement, but the Rhai designer decided not to for two reasons:

  1. To prevent scripts from breaking when you omitted a semicolon between two statements that would otherwise be one statement. Rhai wouldn't be alone in this regard because of JavaScript, which has a mechanism called ASI that is only designed to insert semicolons where they are normally required. That's why several style guides, such as Airbnb's one, enforce semicolons.
  2. No consensus on ASI or on Ruby-like handling. Neither way is simple enough to be implemented in Rhai's handwritten lexer.
@C-Ezra-M C-Ezra-M changed the title Add a FAQ page. Add a FAQ page Jun 25, 2023
@schungx
Copy link
Contributor

schungx commented Jun 25, 2023

An FAQ would be a great idea, but it would require at least a number of items to start off with... an FAQ with only one item would look quite silly. Would you be interested to start a draft version off?

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

2 participants