guile-user
[Top][All Lists]
Advanced

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

Re: srfi-89 implementation for guile


From: Martin Becze
Subject: Re: srfi-89 implementation for guile
Date: Mon, 10 Aug 2020 20:40:45 -0500


On 8/10/20 4:26 PM, Linus Björnstam wrote:
> Well done! Macros are great fun. I glanced through your source and could 
> follow it without much hickups. 

Thanks! It has been good learning experience.

> You probably know this already, but you can actually do the sanitize-rest at 
> compile time for cases where the procedure is not passed as an argument to 
> some.other procedure.
> 
> Say we (define* (blah ...) Body...).
> 
> Then you define one function that does argument checking (%blah-check) at 
> runtime and one that does not (%blah)
> 
> Then make the regular blah a macro. Using identifier macros you dispatch to 
> %blah-check if it is not used in call position, or check all keyword 
> arguments and sanitize them at compile time and dispatch it to %blah. 
> 
> I spent some time implementing define-inlinable*, a keyword-aware 
> define-inlinable, using that. I never baked it fully, so I never submitted a 
> patch, but that is the approach I took, and the approach that 
> define-inlinable uses which you can find in the guile sources.
> 

I hadn't thought of this at all. Interesting idea, might give it a try.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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