← Back to context Comment by alexfortin 1 hour ago I'm writing some Crystal (which has Ruby-like syntax) and I'd add `unless` to the list. I like it! 4 comments alexfortin Reply jibalt 20 minutes ago `unless` came from Perl, Ruby adopted it, and so of course did Crystal. egeozcan 1 hour ago "Unless" feels like adding come-from (next to goto) to a language. A statement/flow should not change its meaning after being declared/written IMHO.edit: My criticism is for the suffix version to be clear. Unless / else is actually cool. jibalt 18 minutes ago `destroy_world() if $angry;` is Perl syntax. And Python has `destroy_word() if angry else live_long_and_prosper()`.(But it's not remotely like come-from.)P.S. in re the other response, "unless" is "if not". "until" is "while not". NooneAtAll5 19 minutes ago wdym? "unless" is literally "while not", no come-from mechanics
egeozcan 1 hour ago "Unless" feels like adding come-from (next to goto) to a language. A statement/flow should not change its meaning after being declared/written IMHO.edit: My criticism is for the suffix version to be clear. Unless / else is actually cool. jibalt 18 minutes ago `destroy_world() if $angry;` is Perl syntax. And Python has `destroy_word() if angry else live_long_and_prosper()`.(But it's not remotely like come-from.)P.S. in re the other response, "unless" is "if not". "until" is "while not". NooneAtAll5 19 minutes ago wdym? "unless" is literally "while not", no come-from mechanics
jibalt 18 minutes ago `destroy_world() if $angry;` is Perl syntax. And Python has `destroy_word() if angry else live_long_and_prosper()`.(But it's not remotely like come-from.)P.S. in re the other response, "unless" is "if not". "until" is "while not".
`unless` came from Perl, Ruby adopted it, and so of course did Crystal.
"Unless" feels like adding come-from (next to goto) to a language. A statement/flow should not change its meaning after being declared/written IMHO.
edit: My criticism is for the suffix version to be clear. Unless / else is actually cool.
`destroy_world() if $angry;` is Perl syntax. And Python has `destroy_word() if angry else live_long_and_prosper()`.
(But it's not remotely like come-from.)
P.S. in re the other response, "unless" is "if not". "until" is "while not".
wdym? "unless" is literally "while not", no come-from mechanics