3 ms·
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
by layer8 1y 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.
- ramses0 1y agoPERL 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!