emacs-devel
[Top][All Lists]
Advanced

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

Re: master a6b5985: Avoid duplicated character classes in rx


From: Stefan Monnier
Subject: Re: master a6b5985: Avoid duplicated character classes in rx
Date: Tue, 03 Dec 2019 15:21:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>>>> I'd rather fix the code not to rely on the return value.
>>> I'm sure a lot more code relies on the return value of 'push'.
>> Probably, but I still think it's bad practice to use the return value of
>> an operation which is fundamentally a side-effect.
> But isn't that standard practice?  From the elisp manual, for example:
> (setq x (nreverse x))

I don't think `nreverse` is "fundamentally a side-effect": its return
value is of critical importance.

Similarly return values which correspond to side-information about how
the side-effect was done (e.g. status or error codes) aren't subject to
the above "rule".


        Stefan




reply via email to

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