GNU bug report logs -
#16990
24.3.50; Return a useful value for motion functions
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Tue, 11 Mar 2014 20:05:02 UTC
Severity: wishlist
Tags: wontfix
Found in version 24.3.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> > Enhancement request: Return a useful value for motion functions,
> > when possible.
> >
> > The set of candidate functions for enhancement are motion functions.
> > Yes, each needs to be checked in detail, and handled appropriately.
> > One size does not fit all. A return value choice should be based on
> > what is generally most useful in the context of using the function.
> >
> > This is the promised followup from the discussion for bug #15117. See
> > that thread for more information (relevant functions, possible return
> > values, etc.)
>
> I seem to recall that this was about you wanting side-effect-only
> functions to return values? The rest of us were against it, I think.
> Closing.
You seem to recall wrong. There was no "rest of us were against
it" - at all. And no, it was not as superficial and general as
my "wanting side-effect-only functions to return [useful] values".
Please read the Subject line. This is about motion functions -
at least some of them, and to be examined on a case-by-case basis.
Here's Eli, saying the same thing (in the referenced bug thread)
I say in my 2nd sentence of this thread: one size does not fit all,
and suggesting reasonable (better) values for two such functions:
Why point? E.g., forward-to-indentation could returns the
column where it ended up, forward-same-syntax could return
the syntax class, forward-visible-line could return the
number of screen lines traversed, etc.
Once again, the potentially useful value might well be
different for each function, and needs to be considered
separately for each. There's no "one fits all" here.
He clearly was thinking about the question, not just
applying a knee-jerk reaction that any suggestion of
having a side-effect function return a useful value is
silly. He was carefully thinking about what the best
value might be for each of the functions he considered.
Yes, nil could be a reasonable return value for some such
functions. But sometimes a better value is available. This
bug is about finding such values and making the functions
return them.
This bug report was last modified 9 years and 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.