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

Damien Mattei <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <CADEOadfZC+gwUPHUWFvFe5Po9HcTZwdhvEUCFGhXezr8WmtX7Q@mail.gmail.com>
at any point in any scheme if the user write such a thing:
(let ((list 3)) (list 4))
there will be a serious problem

On Mon, May 6, 2024 at 11:41 AM Jean Abou Samra <[email protected]> wrote:

> > (with-syntax ((parsed-evaluated-args
> >                (datum->syntax #f (cons 'list
> (optimizer-parse-square-brackets-arguments-lister
> >                                               (syntax->datum
> #'args-brackets))))))
>
> 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'd advise you refactor your
> optimizer-parse-square-brackets-arguments-lister
> function so that it takes #'args-brackets instead of (syntax->datum
> #'args-brackets)
> and works with it in a hygienic way.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.