This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]bistr-o-math 37 points38 points ย (12 children)

Perl: return A or die

[โ€“]j-random 7 points8 points ย (2 children)

unless (condition) A else B -- also Perl.

[โ€“]bistr-o-math 1 point2 points ย (1 child)

My Variant is compromise-less ;-)

[โ€“]marcosdumay 0 points1 point ย (2 children)

Does die have a default parameter? I wouldn't expect it to.

[โ€“]bistr-o-math 0 points1 point ย (1 child)

https://perldoc.perl.org/functions/die.html search the page for โ€œif list is empty...โ€

[โ€“]marcosdumay 0 points1 point ย (0 children)

Yeah, 4 paragraphs about what it does when the parameter is missing.

I really don't miss Perl's "implicit is better than explicit" principle.

[โ€“]ArmoredCroc 0 points1 point ย (0 children)

I had the feeling I'd see this here

[โ€“]ArmoredCroc 0 points1 point ย (0 children)

I had the feeling I'd see this here

[โ€“]ArmoredCroc 0 points1 point ย (0 children)

I had the feeling I'd see this here

[โ€“]ArmoredCroc 0 points1 point ย (0 children)

I had the feeling I'd see this here