simit-lang / simit

A language for computing on sparse systems
http://simit-lang.org
Other
454 stars 52 forks source link

Add conditional operator #85

Open Lugatod opened 7 years ago

Lugatod commented 7 years ago

In order to avoid these kind of if-then-else :

if booleanCondition variable = TrueValue else variable = FalseValue end

Is it possible to add a conditional operator ?

variable = (boolean condition) ? (TrueValue) [:(FalseValue)];

Ideally, this operator should work for all types and sets.