Re: Changes to Euphoria
ken mortenson wrote:
>
> while (1)
> ...
> end while
>
> I would claim that quicker comprehension occurs with this construct...
>
> Loop
> ...
> End Loop
>
> Both are infinite loops. Yes, it's not much quicker to comprehend, we're
> not dolts after all, but after examining thousands of lines of code, by
> 3am I betcha that it becomes a bit more significant.
Incorrect. The lack, at the beginning, of the indicator as to finality means I
must open up a stack in my brain as I see Loop. And I can't pull from that stack
until perhaps much later. Bad idea.
> Now, how about getting out of the loop?
> But for a minimalist the answer is right there, IF. You need something
> like EXIT to be used with the IF, but IF eliminates the need for any
> additional unneeded keywords because you can put the IF test anywhere in the
> loop; beginning, middle and end.
Your beginning and my beginning are different. I want it at **THE** beginning.
Not on the next line, indented or not. I want to comprehend as much of the logic
that is being proposed, as quickly as possible, without having to span additional
lines (sometimes pages and pages of lines) until I get to a test intended to
allow for exit.
Even if you *allow* such specification at the very beginning, it sounds like you
would also *allow* it many lines later. All arguments that rail against GOTO
rail against separating the exit test from the definition. I can do that now
with a while(1) loop. I don't want to HAVE to do it for all loops.
> Exit tells you immediately that you are
> leaving the loop you are currently in.
For my compiler (read: brain) to do anything "immediately" I must see the
conditional test. If that doesn't appear until many lines of code later, I can't
do it *immediately*.
If this idea had merit, all loops would be while(1) loops, which we already
have, and are avoided unless necessary by virtually everybody.
> But it's not about me. So please consider the merits regardless of the
> source.
I see no merit, no matter the source.
Mike
|
Not Categorized, Please Help
|
|