guile-user
[Top][All Lists]
Advanced

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

RE: with-syntax return error in Guile, not in Kawa or Racket


From: Maxime Devos
Subject: RE: with-syntax return error in Guile, not in Kawa or Racket
Date: Mon, 6 May 2024 20:58:39 +0200

> [...]
>
> That should work, but it's also non-hygienic. For example, it will
> be affected if the user does
>
> (let ((list ...))
>   (call-your-macro ...))
>
>> and since you use #f in the datum->syntax call, it will also strip away
>> all hygiene annotations from the args-brackets, causing problems inside
>> that as well.
>>

>i changed #f to stx in the macro

That doesn’t make it hygienic, for the reasons mentioned above.

syntax (#') / quasisyntax (#`)/ unsyntax (#,)  and unsyntax-splicing (#,@) your 
friend – they behave pretty much the same as their quote/quasiquote/... 
counterparts.

Hygiene is usually pretty simple – just don’t do sexp things (say, quasiquote), 
do syntax things (quasisyntax) instead, then typically things will go well.

Best regards,
Maxime Devos.


reply via email to

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