slang-users mailing list

[2008 Date Index] [2008 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Re: goto statement in slang


Jörg Sommer <joerg@xxxxxxxxxxxx> wrote:
> As we all know goto is evil, I expect you never will implement it. But

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.

With that said, I have no intentions to add it to slang and would
rather add richer control statements, such as the "then" clause that
was added to the looping statements of slang-2.1.

> 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.

Thanks,
--John



[2008 date index] [2008 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]