|
From: | Aaron Hill |
Subject: | Re: Should we be touching goops? |
Date: | Mon, 06 Jun 2022 18:26:37 -0700 |
On 2022-06-06 6:19 pm, Aaron Hill wrote:
That said, I did find one surprise looking at [1]. I would not have expected 1+ (increment) to work without some way of Scheme knowing how to construct unity for a given type. Am I just overlooking where such a <Moment> is being specified? Or is there supposed to be a type-specific overload of 1+? I am worried something might not have gotten committed. [1]: https://gitlab.com/lilypond/lilypond/-/merge_requests/1404/diffs?commit_id=bafd55131495ad58d8c9eb4439f60c8789bc9dc8#98b870cc087eeb4becf470fa3ec9b05b85962f2f_115_109
Ah, never mind. I thought division was producing a <Moment> as the result. Looks like it is just a normal rational number, which would already support increment.
This might be worth documenting: which types support which operators and what types the results are. I am probably not going to be the only one caught off guard.
-- Aaron Hill
[Prev in Thread] | Current Thread | [Next in Thread] |