Am 24.03.20 um 02:09 schrieb Riccardo (Jack) Lucchetti:
On Mon, 23 Mar 2020, Allin Cottrell wrote:
> I'm thinking that an early 2020b release would be good, to address the
> macOS Catalina security issue (about which we'll probably hear more).
>
> In that context, I think most of the changes since 2020a are harmless,
> with the possible exception of the modification of funcerr(), so I'd
> like to revisit that.
>
> Quick recap:
[...]
> Here are my second thoughts. Usually when we offer a function version
> of a command it's just a matter of adding convenience, for users
> comfortable with function calls, with no change in semantics relative
> to the command. That's true of the first version of funcerr() but not
> the latest one. So my latest change is kinda unruly.
>
> If we were willing to add a new function we might call it "iferror",
> as in
>
> iferror(error_condition, message)
Not sure "iferror" is an appropriate name for it. To me, it suggests
that if an error occurs do something else.
The description of funcerr() says:
"Applicable only in the context of a user-defined function (see
function). Causes execution of the current function to terminate with an
error condition flagged."
Why not call it terminate(error_condition, message)?
> This would work just like the new funcerr(), but funcerr() itself
> would revert to its usage in 2020a, parallel to the command. Any
> thoughts?
I think this is cleaner. Eventually, we can deprecate the function form
of funcerr() and retire it (clearly, in due course).
I agree that this is much cleaner without the risk of breaking legacy code.
Best,
Artur