unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 15117@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value
Date: Mon, 10 Feb 2014 22:40:25 -0800 (PST)	[thread overview]
Message-ID: <ecf31b60-707c-467f-8272-f6d6fc6e3f55@default> (raw)
In-Reply-To: <87mwhy4ftl.fsf@yandex.ru>

> > Everything in the universe has side effects.  Ohhmmmm.  It's true.
> 
> You should look up "referential transparency".

Perhaps you should give me the benefit of the doubt.  I'm actually
well aware of referential transparency.  That might even have been
the case before you uttered your first side-effect cry. ;-)

> Please read
> http://en.wikipedia.org/wiki/Side_effect_(computer_science)

Please spare me the comp-sci lesson.  FYI, I was at the Santa Fe
graph-reduction workshop in 1986, discussing what would ultimately
become Haskell with John Hughes, Phil Wadler, Paul Hudak, and Simon
Peyton-Jones.  That's only to assure you that I am somewhat at home
in this forest.

I've been a proponent of purely functional and logic programming
for over 30 years.  And yet I have also enjoyed programming in
nasty old Lisp for the same period. ;-)  Go figure.

> "function with side effects" is a pretty well-defined term. A
> function does not necessarily have to modify an Emacs buffer to
> be termed as such.

Cough, gag.  Yes, indeed.  I really did not mean to suggest
otherwise.

> > By your (newfound) logic, you will presumably remove mention of
> > the return value from the doc for those functions.  The same
> > logic behind documenting their return value applies to these
> > other motion functions.
> 
> The logic is simple: 

So are you arguing that we should not document the return value
of those functions either?  Meme combat.

> if the return value is documented, the caller should be able to
> depend on it, 

Yes, that's the idea.

> and "undocumenting" it retroactively isn't an option.  As long as
> the return value is undocumented, but the function can still be
> useful without it, it can stay that way indefinitely.

When have you ever seen Emacs Dev worry a lot about changing
something, let alone undocumenting a return value retroactively?
Let's not exaggerate.

Yes, the return value for these simple motion functions should be
documented, and thus users should be able to depend on it.

That is no more of a constraint on Emacs-Lisp implementors than
is letting users depend on the value of `point' when the function
is finished.

We are not designing a language standard that will be implemented
here and there around the world using different teams and different
technologies for different purposes for the next 100 years.

This is Emacs Lisp, not Common Lisp.  Let's not get carried away.
And even Common Lisp defines return values for the vast majority
of its functions, whether or not they perform side effects.





  reply	other threads:[~2014-02-11  6:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-17 15:59 bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value Drew Adams
2014-02-08  5:08 ` Lars Ingebrigtsen
2014-02-10  0:12   ` Drew Adams
2014-02-10  2:39     ` Lars Ingebrigtsen
2014-02-10  2:45       ` Drew Adams
2014-02-10 16:27     ` Stefan Monnier
2014-02-10 21:16       ` Drew Adams
2014-02-11  1:07         ` Dmitry Gutov
2014-02-11  6:40           ` Drew Adams [this message]
2014-02-11  1:28         ` Juanma Barranquero
2014-02-11  6:43           ` Drew Adams
2014-02-11 16:31             ` Eli Zaretskii
2014-02-11 17:29               ` Drew Adams
2014-02-11 18:05                 ` Eli Zaretskii
2014-02-11 18:42                 ` Andreas Röhler
2014-02-11 18:58                   ` Eli Zaretskii
2014-02-11 19:13                     ` Drew Adams
2014-02-11 19:26                     ` Andreas Röhler
2014-02-11 17:36             ` Juanma Barranquero
2014-02-11  2:52         ` Glenn Morris
2014-02-11  4:01         ` Stefan Monnier
2014-02-11 10:52           ` Andreas Röhler
2014-02-11 11:16             ` Nicolas Richard
2014-02-11 12:10               ` Andreas Röhler
     [not found] <<1dc76f7a-5481-41df-b976-ec22229d7283@default>
     [not found] ` <<874n4a42f0.fsf@building.gnus.org>
     [not found]   ` <<1281d0fd-77cb-45e2-b99d-f4ad24b0fc4e@default>
     [not found]     ` <<jwvr47b3pcw.fsf-monnier+emacsbugs@gnu.org>
     [not found]       ` <<2fefcbaf-9417-4f57-93af-490ea73aea98@default>
     [not found]         ` <<CAAeL0SRYdnYryaVzADc5L61vgM0EPQeBzG2h327YynitS18tXA@mail.gmail.com>
     [not found]           ` <<68a64949-d801-4d09-8dc8-4b6ae0824855@default>
     [not found]             ` <<8361oltxu1.fsf@gnu.org>
     [not found]               ` <<67b917ca-8b69-49fd-9e12-68da310f7567@default>
     [not found]                 ` <<8338jpttic.fsf@gnu.org>
2014-02-11 18:14                   ` Drew Adams
2014-02-11 18:17                     ` Eli Zaretskii
     [not found]                   ` <<5889df4e-4343-4136-ae49-4062659da625@default>
     [not found]                     ` <<831tz9tsy2.fsf@gnu.org>
2014-02-11 18:26                       ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ecf31b60-707c-467f-8272-f6d6fc6e3f55@default \
    --to=drew.adams@oracle.com \
    --cc=15117@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).