lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hash: SHA1

Duncan Cross wrote:
> Personally, I would happily go so far as sacrificing the
> until-expression-inside-loop scope rule so that continue could be
> added, and that's as someone who does use repeat/until loops and can
> see the benefit of this scoping rule. (Raising a parse error if and
> only if the problem is encountered is better still, of course.)

I'm with this as well; I find the new until scope counterintuitive. And
I do miss continue.

May I also put in a plea (which I know will be ignored) for arbitrary
goto? Yes it's ugly, yes it's unreadable, yes it's abused, yes there is
nearly always some way around it, but for that tiny corner case where
there *isn't* a way around it it is utterly invaluable. I don't care how
messy or unsafe it is, and am perfectly happy to have jumps over local
statements produce variables full of garbage.

goto is particularly handy for implementing complex state machines;
these particularly tend to be machine generated, so readability isn't a
problem (and adding the logic to decompose the block graph into
traditional call graphs is astonishingly non-trivial and, I believe,
downright impossible in places).

And lastly I also refer you to Flon's Axiom:

  There does not now, nor will there ever, exist a programming language
  in which it is the least bit hard to write bad programs.

- --
┌─── ───── ─────
│ "People who think they know everything really annoy those of us who
│ know we don't." --- Bjarne Stroustrup
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla -