book icon indicating copy to clipboard operation
book copied to clipboard

Add a FAQ page

Open C-Ezra-M opened this issue 1 year ago • 1 comments

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 avatar Jun 25 '23 07:06 C-Ezra-M

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?

schungx avatar Jun 25 '23 12:06 schungx