[Top][All Lists]

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

Re: Work on Issue 1320

From: Carl Sorensen
Subject: Re: Work on Issue 1320
Date: Fri, 6 Apr 2012 21:04:57 +0000
User-agent: Microsoft-MacOutlook/

On 4/5/12 12:51 PM, "Marc Hohl" <address@hidden> wrote:

>Does it make sense to replace the definitions in
>with the scheme equivalents? If yes, I'd draw a patch and would include
>one example for integrating user-defined bar lines with the new approach
>as a snippet (once I get the dashed bar line right in place ...)

It seems to me that it makes sense to put the stencil building functions
in Guile instead of in c++.  No sense adding the extra interface layer for
scheme calls from c++.

I would suggest that you make custom-bar-print-alist and
custom-bar-glyph-alist context properties, so they will be documented and
available for modification.

Whenever I see Scheme code that says something like

(do ((
     (set!  foo bar)))

I cringe a bit. This looks like a direct statement-by-statement
translation from c++, rather than an implementation in native Scheme
idioms.  set! creates a side effect for the procedure, and the Scheme
gurus like to avoid side effects as much as possible (at least they did 25
years ago ... am I really that old?).  I haven't looked carefully at your
code to write an alternative, but it's likely that this code can be
rewritten either as a recursive function or as a map, fold, or apply
function, all of which are more native Scheme idioms.

Anyway, overall this looks like great work, and I think we ought to get it
into the code base.



reply via email to

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