Re: Invalid Operating System

[prev] [thread] [next] [lurker] [Date index for 2006/12/17]

From: David Landgren
Subject: Re: Invalid Operating System
Date: 17:00 on 17 Dec 2006
A. Pagaltzis wrote:
> * Michael Leuchtenburg <michael@xxxxxxxxx.xxx> [2006-12-16 19:05]:
>> What is this, loves-perl? Release your anger, your hate!
> 
> Yes, well. In another subthread, Abigail accused me of defending
> Perl when all I did was ask Peter for clarification about his
> gripes; *this* part of the thread is what a pile-on in defence of
> Perl looks like.
> 
>> I hate Perl.
> 
> I don't, on the whole (if that wasn't clear), but I do have my
> long list of gripes.
> 
>> I hate the fucking useless "continue" blocks. If I want to
>> execute something just before the conditional is evaluated,
>> then I'll *put it at the end of the loop*.
> 
> Except if you need it to always be executed, even if you abort an
> iteration with `continue`. Then "d'uh put it at the end of the
> block" won't work and you have to use a `continue` block.

Except that the festering pile of canine excrement that is the hateful 
'continue' block doesn't allow you do anything useful at the end of the 
block.

Why? Because it has its own goddamned lexical scope! So you can't just 
add, for instance, a catch-all $prev = $cur when you're watching out for 
a change in something... because those variables aren't known to the 
continue block, they're known only to the iteration block to which the 
continue block is attached. This has been my experience on the odd 
occasion when I could have happily used one.

This behaviour is so broken as to be absolutely useless. Hate hate hate. 
Although I dare sat that allowing the scope of the iterator block to 
leak into the continue block would unleash its own flavour of hate.

> Basically, `continue` is there to enable you to do in Perl what
> you can't do in C: write an exact equivalent of a `for(;;)` loop
> using `while`.
 >
> I've never seen `continue` in any Perl code outside of the
> examples in the Perl documentation.

And you wonder why?

David
-- 
hope still, a little resistance always maybe stubborn tiny lights vs. 
clustering darkness forever ok?
There's stuff above here

Generated at 22:02 on 27 Dec 2006 by mariachi 0.52