unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jens C. Jensen <jensecj@gmail.com>
To: Emanuel Berg <moasenwood@zoho.eu>, help-gnu-emacs@gnu.org
Subject: Re: problems with Emacs 28
Date: Wed, 28 Oct 2020 17:21:16 +0100	[thread overview]
Message-ID: <87tuuee2yr.fsf@gmail.com> (raw)
In-Reply-To: <87sga0o6k0.fsf@zoho.eu>

> From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> Date: Tue, 27 Oct 2020 01:29:03 +0100
>
> method - a function belonging to an OOP object
> procedure - a function that don't return a value
> function - a function that do return a value

These are the terms I recall as well. but it seems this terminology is muddy at best, seeing as how you described each one in terms of 'a function that...'. But I'm stumped with what else to call them, `callable' maybe? :-)

> destructive - changes the value in the actual argument variables.
> It would seem this requires "call by name" or "call by reference", not
> "call by value", right? (Unless the value is a memory location,
> perhaps...)

Yes, or if the context is implicit (e.g. in methods mutating local variables).

> side-effect free - the function doesn't do any changes to anything,
> this implies non-destructiveness

Which is also known as a 'pure' function.

> many Haskell programmers, they like to
> divide their programs in two parts, one with side-effects, and one
> without. This is for different reasons, one advantage would be
> modularity, as the side-effect free part can be brought to any other
> program without ever screwing anything up.

And testing side-effect free code tends to be simple, not having to construct class-hierarchies to test (or worse, debug!) some obscure state is a big boon.





  parent reply	other threads:[~2020-10-28 16:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 16:50 problems with Emacs 28 Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-23 17:33 ` Jean Louis
2020-10-23 18:02   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-23 18:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-24  1:55   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-24 12:56     ` Stefan Monnier
2020-10-24 12:57     ` Stefan Monnier
2020-10-24  9:46   ` Michael Heerdegen
2020-10-24 17:00     ` Drew Adams
2020-10-24 19:26       ` Michael Heerdegen
2020-10-24 22:11         ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-24 22:08       ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-25 12:13       ` Michael Heerdegen
2020-10-25 14:15         ` Drew Adams
2020-10-27  0:29           ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-27 10:22             ` Michael Heerdegen
2020-10-28 16:21             ` Jens C. Jensen [this message]
2020-10-28 17:07               ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-28 17:18               ` Stefan Monnier
2020-10-31 18:26                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-01 13:51                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-23 18:16 ` Eli Zaretskii
2020-10-23 18:22   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-23 18:44 ` Stefan Monnier
2020-10-24  0:13   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-23 19:09 ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-10-24  0:14   ` Emanuel Berg via Users list for the GNU Emacs text editor

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=87tuuee2yr.fsf@gmail.com \
    --to=jensecj@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /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.
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).