[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PROPOSAL] with_cur_ios() function in the stdlib
From: |
apache2 |
Subject: |
Re: [PROPOSAL] with_cur_ios() function in the stdlib |
Date: |
Sun, 10 Apr 2022 18:35:51 +0200 |
User-agent: |
Mutt/1.9.3 (2018-01-21) |
On Sun, Apr 10, 2022 at 04:34:22PM +0200, Jose E. Marchesi wrote:
>
> > On Sun, Apr 10, 2022 at 01:34:46PM +0200, Jose E. Marchesi wrote:
> >> I propose this:
> >>
> >> with_cur_ios :ios ID :do lambda void: { ... }
> >>
> >> Will switch to the IOS ID (which is a descriptor) an execute the given
> >> lambda. It will guaranteed that upon exitting the lambda (in any way)
> >> the previously selected IOS (if any) is restored. This will not open
> >> nor close any IO space.
> >>
> >> This doesn't get handler nor flags arguments obvioulsy.
> >>
> >> with_temp_ios :handler "whatever" :do lambda void: { ... }
> >>
> >> Will _open_ an IOS based on `handler' (if the handler is not specified
> >> it is a memory IOS with an unique name) and execute the lambda. It is
> >> guaranteed that upon exitting the lambda (in any way) the temporary
> >> IOS gets closed and the previously selcted IOS (if any) is restored.
> >>
> >>
> >> And I think I agree with mnabipoor: it is best to have these functions
> >> in the standard library rather than in the run-time.
> >>
> >> Thoughts?
> >>
> >>
> >
> > I like this. More orthogonal. And both of them are useful in real-world.
>
> apache, you good with this?
Yes, fine by me :-)
I don't know what the distinction between the standard library vs the run-time
is, but it sounds fine.
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, (continued)
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, Jose E. Marchesi, 2022/04/10
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, Mohammad-Reza Nabipoor, 2022/04/10
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, Jose E. Marchesi, 2022/04/10
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, Jose E. Marchesi, 2022/04/10
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, Mohammad-Reza Nabipoor, 2022/04/10
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, Jose E. Marchesi, 2022/04/10
- Re: [PROPOSAL] with_cur_ios() function in the stdlib,
apache2 <=
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, Mohammad-Reza Nabipoor, 2022/04/10
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, apache2, 2022/04/10