[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PROPOSAL] with_cur_ios() function in the stdlib
From: |
Jose E. Marchesi |
Subject: |
Re: [PROPOSAL] with_cur_ios() function in the stdlib |
Date: |
Sun, 10 Apr 2022 16:34:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> 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?
- [PROPOSAL] with_cur_ios() function in the stdlib, apache2, 2022/04/09
- 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 <=
- Re: [PROPOSAL] with_cur_ios() function in the stdlib, apache2, 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, apache2, 2022/04/10