lilypond-devel
[Top][All Lists]
Advanced

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

Re: Define Scheme markups using define-public (issue 577720043 by addres


From: dak
Subject: Re: Define Scheme markups using define-public (issue 577720043 by address@hidden)
Date: Sun, 29 Mar 2020 07:03:55 -0700

On 2020/03/29 13:55:41, hanwenn wrote:
> On 2020/03/29 13:52:48, hanwenn wrote:
> > retain existing
> 
> how's this? This leaves things backward compatible.
> 
> Note that we're currently incoherent, because you can't do 
> 
>  (let ((n 0)) (define sym val))

"incoherent" means in conflict with oneself.

> so coherency is probably not a great argument for keeping things as
is.

You can do

(define sym (let ((n 0)) val))

however.  Including replacing val inline with a lambda expression making
use of a lexical capture of n.

You can also do
(define sym #f)
(let ((n 0)) (set! sym (lambda () ... n ...))

There is also letrec and various other things, all of which we don't
have available for the somewhat complex semantics of actually defining a
named markup function.

https://codereview.appspot.com/577720043/



reply via email to

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