lilypond-devel
[Top][All Lists]
Advanced

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

Automatically sort alist grob-properties in IR. (issue 102760044)


From: dak
Subject: Automatically sort alist grob-properties in IR. (issue 102760044)
Date: Wed, 28 May 2014 00:00:58 +0000


https://codereview.appspot.com/102760044/diff/1/scm/document-backend.scm
File scm/document-backend.scm (right):

https://codereview.appspot.com/102760044/diff/1/scm/document-backend.scm#newcode22
scm/document-backend.scm:22: (apply eq? #t (map pair? x))))
(apply eq? #t (map pair? x)) is horribly contorted and subject to
limitations in argument list length.  Use (every pair? x) which has the
advantage of short-circuit evaluation.

Also, it seems like a stretch to assume that every list with pair
members will tolerate sorting.  You do not even restrict this to lists
with symbols in the car, and explicitly sort lists with non-symbols.

That seems like a bad idea.

https://codereview.appspot.com/102760044/diff/1/scm/lily-sort.scm
File scm/lily-sort.scm (right):

https://codereview.appspot.com/102760044/diff/1/scm/lily-sort.scm#newcode112
scm/lily-sort.scm:112: ((and (number? (car a)) (number? (car b)))
Can you point to any "alists" where the keys are numbers?  This seems
rather fishy to me.

https://codereview.appspot.com/102760044/



reply via email to

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