Or Perl 5. `do_stuff() if $a->y();` is a common idiom.
Or Perl 6. `do-stuff() if $a.y;` is the Perl6 version. You can even declare your variables to be sigil-less so you end up with `do-stuff() if a.y;` if you want. See my Perl6 Advent Calendar article for a quick tour of the language, available docs, with practical examples focusing on using Perl6's novel features to write a self documenting command line script.
https://perl6advent.wordpress.com/2018/12/16/
I've written code in everything from assembly to ML, Java, and Prolog. Perl6 is the only language I've used that I would "mind-expanding". The more I use it, the I realize how radical its design is.
from Hacker News - New Comments: "WordPress" https://ift.tt/2QIyg66
via IFTTT
No comments:
Post a Comment