Repository navigation
feat: switch - #1278
feat: switch#1278
Conversation
|
Amazing — huge win! (and such a small PR!) |
|
Isn't it rather misleading to use I propose instead to do it the way Rust does and use |
This isn't matching against a value, it's switching based on which condition is |
Oh okay, I think I get it now, but it is a bit unconventional and different from the C-style An alternative could be: from employees
derive display_name = condition [
if nickname != null -> nickname,
else -> f'{first_name} {last_name}'
]This would avoid confusion by not using the name name "switch" , and instead using some other name such as "condition". Using the keywords |
|
I actually think you're right about the switch statement. I'm not sure why I missed that before. I think we were going between We did spend a lot of time discussing this, and we've spent a lot of time discussing the syntax (!), so maybe folks' patience for more discussions is waning. But I would propose we either:
I'm less of a fan of the |
First stab at #504
Note that:
truecondition.truecondition, default is NULL (unlike in SQL where an exception is the default).