lilypond-devel
[Top][All Lists]
Advanced

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

Re: Use define-syntax for define-session[-public] (issue 553480044 by ad


From: dak
Subject: Re: Use define-syntax for define-session[-public] (issue 553480044 by address@hidden)
Date: Tue, 04 Feb 2020 13:15:43 -0800

NLGTM

This patch just punts on using an internal function, and that could be
equally well be done without involving syntax-case.

An alternative proposal that just relies on a single external symbol in
order to achieve the original design is given as

Tracker issue: 5735
(https://sourceforge.net/p/testlilyissues/issues/5735/)
Rietveld issue: 549510043 (https://codereview.appspot.com/549510043)
Issue description:
  Rewrite define-session and define-session-public macros  The byte
  compiler of Guile-2.x is not able to compile anonymous
  functions/closures into constants.  Rewriting the macros not to rely
  on such constants by moving the local functions into their own
  function definitions is the easiest expedient.



https://codereview.appspot.com/553480044/diff/557280043/scm/lily.scm
File scm/lily.scm (right):

https://codereview.appspot.com/553480044/diff/557280043/scm/lily.scm#newcode135
scm/lily.scm:135: (acons (quote name) (make-session-variable (quote
name) value) lilypond-exports))
This is actually a purely textual replacement rather than anything more
complex or hygienic.  As such it does nothing that cannot equally well
be achieved using defmacro: the problematic issue with the byte compiler
was the internal function that was used for _avoiding_ a wholesale
textual replacement.

So drawing in a module that is known to be buggy and unmaintained in
Guile-1.8 does not even serve a purpose here.

https://codereview.appspot.com/553480044/



reply via email to

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