← Back to context Comment by alexfortin 3 hours ago I'm writing some Crystal (which has Ruby-like syntax) and I'd add `unless` to the list. I like it! 6 comments alexfortin Reply egeozcan 3 hours 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 2 hours 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 2 hours ago wdym? "unless" is literally "while not", no come-from mechanics amszmidt 2 hours ago “unless” is “if not” — it is not generally looping construct. jibalt 2 hours ago `unless` came from Perl, Ruby adopted it, and so of course did Crystal. amszmidt 2 hours ago ”unless” already existed in early Lisps in the 1970s…
egeozcan 3 hours 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 2 hours 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 2 hours ago wdym? "unless" is literally "while not", no come-from mechanics amszmidt 2 hours ago “unless” is “if not” — it is not generally looping construct.
jibalt 2 hours 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 2 hours ago wdym? "unless" is literally "while not", no come-from mechanics amszmidt 2 hours ago “unless” is “if not” — it is not generally looping construct.
jibalt 2 hours ago `unless` came from Perl, Ruby adopted it, and so of course did Crystal. amszmidt 2 hours ago ”unless” already existed in early Lisps in the 1970s…
"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
“unless” is “if not” — it is not generally looping construct.
`unless` came from Perl, Ruby adopted it, and so of course did Crystal.
”unless” already existed in early Lisps in the 1970s…