logoalt Hacker News

alexfortin • today at 5:19 AM • 2 replies • view on HN

I'm writing some Crystal (which has Ruby-like syntax) and I'd add `unless` to the list. I like it!


Replies

egeozcan • today at 5:31 AM

"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.

➕ show 2 replies
jibalt • today at 6:03 AM

`unless` came from Perl, Ruby adopted it, and so of course did Crystal.

➕ show 1 reply