bug-bash
[Top][All Lists]
Advanced

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

Re: feature request: new builtin `defer`, scope delayed eval


From: Alex fxmbsw7 Ratchev
Subject: Re: feature request: new builtin `defer`, scope delayed eval
Date: Wed, 12 Oct 2022 10:51:54 +0200

On Sat, Oct 8, 2022, 12:03 Oğuz <oguzismailuysal@gmail.com> wrote:

> 8 Ekim 2022 Cumartesi tarihinde Cynthia Coan <cynthia@coan.dev> yazdı:
> >
> > [...] I think
> > use cases outside of cleanup are relatively sparse, [...]
>
>
> There. There already are several ways to do cleanup on exit/return using
> existing features, why add one more?
>
>
> > [...] With your syntax you still have to be aware of what's
> > in that trap [...]
> >
>
> Not really. If, for some reason, I didn't know what's in that trap and were
> super paranoiac about it, I could do
>
>     oldaction=$(trap -P EXIT)
>     trap 'eval "$oldaction"; bar' EXIT
>
> I've never been in such a situation though.
>

there is, run code addment / management , for trap code

>
> Don't get me wrong, I just like it when new features align with the old
> ones and work together nicely.
>
>
> --
> Oğuz
>


reply via email to

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