- Subject: [slang-users] Re: goto statement in slang
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Date: Wed, 17 Sep 2008 19:45:41 +0000 (UTC)
Hello John,
"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> Jörg Sommer <joerg@xxxxxxxxxxxx> wrote:
>> As we all know goto is evil, I expect you never will implement it. But
I've forgot to put a smiley here.
> I used to think it was evil when I started writing code. I was very
> proud of the fact that my first version of `most` did not use "goto".
> For the second and third rewrites of `most`, I replaced the crud that
> was necessary in the various looping statements to avoid the use of
> "goto" with "goto" and the result was much cleaner and understandable
> code. Now I use "goto" when I feel that its use adds clarity to the
> code, and I feel that those who oppose its use are naive.
That's my opinion, too. If it's used advised, it makes the code more
readable.
>> what about break and continue with an optional level as in shell.
>
> I have thought about that for slang-2.2, but I will make no promises
> about it yet.
That would be nice, but decide yourself.
BTW: The short forms && and || of andelse resp. orelse are really handy.
Bye, Jörg.
--
Gienger's Law (http://www.bruhaha.de/laws.html):
Die Wichtigkeit eines Newspostings im Usenet ist reziprok zur Anzahl der
enthaltenenen, kumulierten Ausrufungszeichen.
[2008 date index]
[2008 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]