GNU bug report logs -
#64185
proposal for new function: copy-line
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> > The code becomes slightly more verbose this way, but is far easier to
read
> > and comprehend. It seems an extremely worthwhile tradeoff to me.
>
> Not sure how often users will read the code of duplicate-line.
Developers will. And it's easier to read with symbols.
On Mon, Jun 26, 2023 at 1:41 PM Juri Linkov <juri <at> linkov.net> wrote:
> >> This might surprise you, but code would be more complicated with
> symbols.
> >> Instead of
> >>
> >> (unless (eq duplicate-line-final-position 0)
> >> (forward-line duplicate-line-final-position)
> >>
> >> it will be
> >>
> >> (unless (eq duplicate-line-final-position 'old-original-line)
> >> (when (eq duplicate-line-final-position
> 'first-copied-duplicate-line)
> >> (forward-line 1))
> >> (when (eq duplicate-line-final-position 'last-copied-duplicate-line)
> >> (forward-line -1))
> >
> > The code doesn't need the (unless (eq duplicate-line-final-position
> > 'old-original-line) ... check. It can be only the two when cases. But
> > that's a secondary matter.
>
> I agree.
>
> > The code becomes slightly more verbose this way, but is far easier to
> read
> > and comprehend. It seems an extremely worthwhile tradeoff to me.
>
> Not sure how often users will read the code of duplicate-line.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.