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 support for conditional expressions #3

Closed
bobbinth opened this issue Jun 25, 2019 · 1 comment

Comments

@bobbinth
Copy link
Collaborator

commented Jun 25, 2019

This could be similar to ternary conditional operator. For example:

a ? c : b;

which would be interpreted as c * a + b * (1 - a).

A couple of considerations:

  1. We need to ensure that a is binary (either 1 or 0). Might make sense to limit this to special conditional constants at first.
  2. : is already used as an assignment operator and using it here might be confusing. So, we either need to change : here to something else, or change the assignament operator to something else (e.g. :=, <-, <=).
@bobbinth

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 10, 2019

Closed by #4

@bobbinth bobbinth closed this Jul 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.