perl qstn...

RW rwmaillists at googlemail.com
Mon Apr 5 16:36:37 UTC 2010


On Mon, 05 Apr 2010 09:57:17 +0100
Matthew Seaman <m.seaman at infracaninophile.co.uk> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 

> I've always found that 'unless' makes a great deal of sense when used
> in the alternate syntax:
> 
> do_foo()
>     unless $condition ;
> 
> As far as I know, perl and its descendant ruby are the only
> programming languages that let you put the condition test after the
> action, 

IMO this is a bad mistake that other languages were quite right not to
copy - a test shouldn't come after a block of code unless it's evaluated
after the block (as in repeat...until) 



More information about the freebsd-questions mailing list