-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[RFC][Relay] Text Format Part 2 #3016
Comments
No No No No No on r^. |
For |
@wweic |
|
@MarisaKirisame Thanks for clarification. Just curious about the implementation details. I don't have a use case right now. |
@wweic thanks I fixed the typo |
@tqchen could you provide examples of the |
This PR has been open for a while now. Please post your final thoughts so we can close this and begin implementing the language features. In particular, we should try to come to some resolution on attributes. @tqchen @MarisaKirisame @jroesch @wweic @vinx13 @junrushao1994 @nhynes |
My single objection is no ^. |
I'm good with the RFC overall. Slightly prefer |
Please conclude and summarize the RFC so we could start a vote about the text format |
Here is a summary of the proposed text format changes. RefCreate:
Pattern Matching:
Generics
TupleGetItem: Please vote on these changes. This will allow us to nearly solidify the text format. |
@joshpoll what about type inference? How will it work if the type parameter is inferred? e.g. Some(5)? |
We might also need to support |
This RFC isa bit out-dated, I would recommend close it, and open new checklist for the next todos |
The following RFC is for more bikeshedding about syntax of the Relay text format not covered by #1782.
The guiding principles for syntax choices are
Please provide feedback on the syntax choices below or other syntactic features you think should be discussed that weren't already agreed on in #1782.
References
RefCreate
Existing languages:
OCaml
ReasonML
Relay Proposal
RefWrite
OCaml
ReasonML
Relay Proposal
RefRead
OCaml
ReasonML (adopted because
!
is already used fornot
)It may be temping to use
&x
, but this implies that any expression has a reference, whereas in ML-like languages references must be created explicitly.Relay Proposal
Prefixes seem better than postfixes, but we need to avoid
!
do to ambiguity. I'm open to other suggestions.ADTs
ReasonML
Rust
Relay Proposal
Pattern Matching
ReasonML
Rust
Relay Proposal
case
is also a viable alternative keyword.Generics (i.e. type arguments)
Rust
ReasonML
Scala
Python
Relay Proposal
TupleGetItem
ReasonML
Rust
Scala
Python
Relay Proposal
Semicolons
We need to consider whether or not to use semicolons as separators in sequence operations. The pros of using semicolons is they're easier to implement and allow us to ignore newline characters when writing and parsing programs. The cons are they are more cumbersome and make the text format less python-like.
Attributes
Python
Relay Proposal
when the attrs type index matches the operator's attrs type index
when it doesn't.
I'm not as certain about this syntax piece, so I'm very open to suggestions here.
cc @tqchen @MarisaKirisame @jroesch @wweic @vinx13 @junrushao1994 @nhynes
The text was updated successfully, but these errors were encountered: