[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value
From: |
Andreas Röhler |
Subject: |
bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value |
Date: |
Tue, 11 Feb 2014 13:10:23 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Am 11.02.2014 12:16, schrieb Nicolas Richard:
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
Am 11.02.2014 05:01, schrieb Stefan Monnier:
Says you. For me (and most definitions of side-effects I've ever seen),
a side-effecting function is something like a function where the calls
can't simply be replaced by their return value.
Can't see a logic link between a possible return value and the notion of
side-effect.
It all depends from the purpose of the function.
I guess this is a slight misunderstanding. The notion of side-effect is
well defined in CS: « a function or expression is said to have a side
effect if, in addition to returning a value, it also modifies some state
or has an observable interaction with calling functions or the outside
world. »
(http://en.wikipedia.org/wiki/Side_effect_%28computer_science%29)
WP is often good, sometimes bad, sometimes just an agent of CIA, NSA and their
satellites.
Saying in WP is no proof at all.
If you read "in addition to returning a value": functions must not return a
value, but might have side-effects
The notions of "mostly-unintended effect" (like so: (defun
my-point-at-eol (progn (end-of-line) (point)))) or "multi-purpose
functions by means of global variables" (e.g. the use of 'org-ts-what in
org-at-timestamp-p -- which is kind of scary if I may say) are only
special cases of side effects.
It's also not about unintended side-effect, also also about intended.
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, (continued)
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Drew Adams, 2014/02/11
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Andreas Röhler, 2014/02/11
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Eli Zaretskii, 2014/02/11
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Drew Adams, 2014/02/11
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Andreas Röhler, 2014/02/11
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Juanma Barranquero, 2014/02/11
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Glenn Morris, 2014/02/10
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Stefan Monnier, 2014/02/10
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Andreas Röhler, 2014/02/11
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value, Nicolas Richard, 2014/02/11
- bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value,
Andreas Röhler <=