Hacker News new | ask | show | jobs
by layer8 228 days ago
I’m not a native speaker, but I always liked the postfix “unless” in Perl, for use with operations that are performed in the common case and only omitted under special circumstances.

    do_something() unless special_condition;
It vibes with “unless” in English usually implying an exception.
1 comments

PERL was too clever by half, but if you leaned into making it readable, there were lots of tricks that could help.

    do_register() unless invalid()
    do_send_email() unless email_down()
    do_login() unless password_to_short()
... it wouldn't be the way you'd do it today, but if used "tastefully", they were helpful!