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

v4 syntax TODO #2672

Open
5 of 9 tasks
jordwalke opened this issue Sep 30, 2022 · 0 comments
Open
5 of 9 tasks

v4 syntax TODO #2672

jordwalke opened this issue Sep 30, 2022 · 0 comments

Comments

@jordwalke
Copy link
Member

jordwalke commented Sep 30, 2022

Here is the current stack of diffs for v4 features.

This task list tracks the remaining items that make sense to do in a breaking release.

  • Support for reason version tagging at start of file [@reason.version 3.7];
  • String template support using backticks like ES6, and polymorphic variants now use tag syntax #LikeThis.
  • String template literals normalize leading whitespace unlike ES6.
  • Type parameters use angle brackets type doubleList<'t> = list<('t, 't)>.
  • Automatically update entire reason file to v4 editor if detecting use of angle brackets for type parameters.
  • Fix parsing precedence of string concatenation ++ and various operators to be left biased in the AST so that x ++ y ++ z is (x++y) ++ z.
  • Figure out how to interpolate printing of types in string literals. Should we use the same construct as printf for this?
        let x = `
          By default a string is expected here ${someVariableThatIsAString}
          But what about an integer %d{int here}
          And what about a custom datatype %%{myCustomDataType, printer}
        `
  • Decide identifier renaming (or not) scheme once and for all to avoid all identifier conflicts/ambiguity with ocaml identifiers.
  • { } should not be an empty object and not be the empty object type. Should possibly be unit in expression and something else in types. Empty objects are seldom used.
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