[Top][All Lists]

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

Re: Loop macros (was: Re: macro definition for continue and break)

From: Linus Björnstam
Subject: Re: Loop macros (was: Re: macro definition for continue and break)
Date: Mon, 12 Sep 2022 23:09:10 +0200
User-agent: Cyrus-JMAP/3.7.0-alpha0-929-g09f3e68182-fm-20220908.004-g09f3e681

I would say it is mostly an extension of foof-loop with the addition of 
subloops. It is also written mostly in syntax-rules, which makes is portable.

I am not happy with the extensibility outside the possibility to add :for and 
:acc clauses, since it is pretty darn awful do do any changes to the internals.

I have a couple of things I want to sort out, but the source code has started 
to scare me. 

  Linus Björnstam

On Mon, 12 Sep 2022, at 22:57, Maxime Devos wrote:
> On 12-09-2022 21:19, Linus Björnstam wrote:
>> If you want a bit more advanced looping you could have a look at my 
>> goof-loop:
>> It currently does not support a break or continue clause, but adding one 
>> should not really be a problem.
>> A good thing is that it does not rely on mutation for anything except higher 
>> order sequences, meaning it does not lead to the implicit boxing overhead of 
>> set!, which is a good idea in loops since that quickly adds up.
>> Best regards
>>    Linus Björnstam
> I also have a mutation-free loop macro, named 'hat-let' or 'let^':
> Its origin is rather different though, goof-loop appears to be the 
> result of combining various loop-related constructs, plus some extras, 
> whereas let^ is the result of combining various binding constructs 
> (including the 'let loop'), plus some extras.
> It combines the following: let*, lambda / define, receive, 'let loop', 
> 'if', 'begin'.
> Doesn't do any accumulation though.
> Greetings,
> Maxime.
> Attachments:
> * OpenPGP_0x49E3EE22191725EE.asc
> * OpenPGP_signature

reply via email to

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