[Top][All Lists]

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

Re: An alias named `done` breaks for loops

From: Oğuz
Subject: Re: An alias named `done` breaks for loops
Date: Sun, 15 Aug 2021 07:58:14 +0300

On Sun, Aug 15, 2021 at 1:59 AM George Nachman <gnachman@llamas.org> wrote:
> `done` should not be considered a simple command in the context where it
> would terminate a for loop. Alternately, prevent the user from creating
> aliases that will cause problems like this.

There already is an alias substitution rule for preventing these problems:

    The first word of the replacement text is tested for aliases, but
a word that is identical to an alias being expanded is not expanded a
second time.

and I think that's enough; you can still produce reserved words and
have them recognized as such. There is no need for such radical
changes to the language.

reply via email to

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