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

Migrate Free Variable syntax from $$x to x? to ?x #10

Closed
LPTK opened this issue Jan 27, 2017 · 1 comment
Closed

Migrate Free Variable syntax from $$x to x? to ?x #10

LPTK opened this issue Jan 27, 2017 · 1 comment

Comments

@LPTK
Copy link
Member

LPTK commented Jan 27, 2017

Syntax is already available; just need to remove uses of the old one, and possibly repurpose it.

@LPTK LPTK added this to the Version 1.0 milestone Jan 27, 2017
@LPTK LPTK modified the milestones: Version 0.2, Version 1.0 Aug 29, 2017
@LPTK
Copy link
Member Author

LPTK commented Sep 22, 2017

Some notes:

x? may not be a good syntax; together with a type annotation ir"(x? : Int) + 1", it may look to some people too close to C-like ternary operators. It also sometimes makes for ambiguous parses (eg: in ir"x?:Int" there is currently a dirty trick to go around the fact it is parsed as a use of operator ?:).

Syntax ?x seems nice, as in ir"(?x:Int)+1".

We also need a corresponding syntax for quasicode. The nice thing about the ?x syntax is that we could also have it in QC, as it desugars to ?.x (then just have in scope a ? value that extends Dynamic and defines selectDynamic as returning Nothing, so we can type-check the code).

@LPTK LPTK changed the title Migrate Free Variable syntax from $$x to x? Migrate Free Variable syntax from $$x to x? to ?x Dec 1, 2017
@LPTK LPTK closed this as completed in 52d8bdb Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant