GNU bug report logs -
#33870
27.0.50; xref-goto-xref not configurable
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Tue, 25 Dec 2018 20:53:01 UTC
Severity: minor
Found in version 27.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> > So using (direction . (DIR . WIN)) would be OK?
>
> And what to do when the future will require adding a third arg?
> This is why better to avoid dotted pairs, and use a list like
> (direction DIR WIN)
(Caveat: I haven't been following this thread.)
But YES to what Juri wrote there. This is a
(minor) pet peeve of mine. I like dotted pairs
for some things, but this is a standard gotcha.
Sometimes doing this might represent premature
optimization. Sometimes it might come from
focusing too closely on the initial use case
(e.g. the only use case, to start with). But
it happens - to all of us, no doubt.
(You could later hack the definition to also
allow something else in place of (DIR . WIN),
but that kind of thing becomes ugly, especially
if abused more than once.)
Example:
Whoever designed the Lisp representation of a
noncontiguous region trapped us the same way.
By using a dotted pair of scalar values, that
design pretty much precludes adding other info
besides the start and end limits to a region
segment.
The zones of `zones.el' are similar to the
segments of a noncontiguous region, but
instead of just (BEGIN . END) a zone has the
form (LIMIT1 LIMIT2 . EXTRA).
I provided from the outset for the possibility
of including EXTRA stuff, even though at that
time I had no special use in mind for it.
Later I was very thankful I had included it.
This bug report was last modified 6 years and 36 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.