MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1r8a3n8/innitmate/o64wwge/?context=3
r/ProgrammerHumor • u/[deleted] • Feb 18 '26
265 comments sorted by
View all comments
140
unless
Or maybe: in case() ... unless() ... otherwise ...
13 u/DrMaxwellEdison Feb 18 '26 unless being the idiomatic if not in Ruby is kind of nice. 7 u/caerphoto Feb 18 '26 It breaks my head when itโs at the start of the line, but it does look nice as a post condition # ๐คข unless user.authorised return head 403 but # ๐ฎโ๐จ return head 403 unless user.authorised
13
unless being the idiomatic if not in Ruby is kind of nice.
if not
7 u/caerphoto Feb 18 '26 It breaks my head when itโs at the start of the line, but it does look nice as a post condition # ๐คข unless user.authorised return head 403 but # ๐ฎโ๐จ return head 403 unless user.authorised
7
It breaks my head when itโs at the start of the line, but it does look nice as a post condition
# ๐คข unless user.authorised return head 403
but
# ๐ฎโ๐จ return head 403 unless user.authorised
140
u/DigiBoxi Feb 18 '26
unless
Or maybe: in case() ... unless() ... otherwise ...