[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Different default arpeggio positions
From: |
Thomas Morley |
Subject: |
Re: Different default arpeggio positions |
Date: |
Sat, 3 Dec 2022 15:58:37 +0100 |
Am Sa., 3. Dez. 2022 um 13:41 Uhr schrieb Jean Abou Samra <jean@abou-samra.fr>:
>
> Le 02/12/2022 à 23:47, Thomas Morley a écrit :
> > I know you like pattern matching, though imho it makes things not
> > always easier for users.
>
>
>
> Yes, I like pattern matching. No, I'm not going to stop using it :-)
I don't intend to advertise you shouldn't use it, but I wanted to
mention my concerns, see below
> Sure, you have to learn it, like every construct,
Ofcourse. Though, it's another thing a (probably new) user has to
learn, maybe scaring him/her away.
Therefore I usually code using only simple features from default
guile, using more "fancy" modules only if really neccessary.
Looks this opinion is not very wide spread. I had a similar discussion
with a guile-dev some time ago, LOL
> but it improves code clarity IMHO (especially in complex code).
>
>
> > Even for me - I don't understand that (x x)-line:
> >
> > \override Arpeggio.positions =
> > #(grob-transformer
> > 'positions
> > (lambda (grob original)
> > (match original
> > ((a . b) (cons (- a 5.0) (+ b 5.0)))
> > (x x)))) ;; <==
>
>
>
>
> This was me being too lazy to look up whether
> original might be something other than a pair,
> like #f, '() or *unspecified*, especially if
> the grob suicided itself inside the positions
> callback. In such a case, this code would have
> returned original unchanged, as
>
> (if (pair? original)
> (cons (- (car original) 5.0) (+ (cdr original) 5.0))
> original)
>
> This case appears not to occur, though, so that precaution
> was unnecessary.
>
> Best,
> Jean
>
Thanks for the explanation.
Iiuc, than
(x x)
is a second pattern (and return value), triggered if the first one, a
pair like (a . b), doesn't match.
Thanks,
Harm
- Different default arpeggio positions, Abraham Lee, 2022/12/01
- Re: Different default arpeggio positions, Jean Abou Samra, 2022/12/01
- Re: Different default arpeggio positions, Thomas Morley, 2022/12/01
- Re: Different default arpeggio positions, Jean Abou Samra, 2022/12/01
- Re: Different default arpeggio positions, Abraham Lee, 2022/12/01
- Re: Different default arpeggio positions, Abraham Lee, 2022/12/01
- Re: Different default arpeggio positions, Jean Abou Samra, 2022/12/02
- Re: Different default arpeggio positions, Thomas Morley, 2022/12/02
- Re: Different default arpeggio positions, Pierre Perol-Schneider, 2022/12/03
- Re: Different default arpeggio positions, Jean Abou Samra, 2022/12/03
- Re: Different default arpeggio positions,
Thomas Morley <=
- Re: Different default arpeggio positions, Jean Abou Samra, 2022/12/03
- Re: Different default arpeggio positions, Thomas Morley, 2022/12/03
Re: Different default arpeggio positions, Mark Knoop, 2022/12/01