bug-gnu-utils
[Top][All Lists]
Advanced

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

gawk-3.1.3: switch--suggestion


From: Stepan Kasal
Subject: gawk-3.1.3: switch--suggestion
Date: Tue, 12 Aug 2003 09:44:23 +0200
User-agent: Mutt/1.2.5.1i

Hello Aharon,

        a wish for future version of GNU awk: I think there should be some
cleanup around the new `switch' statement.  For compatibility reasons, I
think there are rare situations when one can afford to --enable-switch at
compile time.

To be honest, I think the arguments from the discussion on c.l.a
are rather convincing and it would be best to back out this feature.
(It doesn't bring any speedup, as awk is not C; it's only a syntactic
sugar and it's arguable whether it's worth the confusion.)

If you decide to leave it in, for whatever reason, please consider
the following.

To make the switch statement really usable, it would have to
be controlled in runtime:

-W switch       --switch        would enable the switch statement

@switch         in source code would enable the switch statement for the
rest of the source.  This directive would usually be at the beginning of
the source.

(Of course, this proposal would infer some changes to awkgram.y, so that
one parser can adapt to different interpretation of `switch'.)

When we are at it, I'd also suggest:

@re-interval    in source code, to enable intervals in regexps.

Just my cent,
        Stepan Kasal





reply via email to

[Prev in Thread] Current Thread [Next in Thread]