help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Several beginner-questions


From: Stefan Monnier
Subject: Re: Several beginner-questions
Date: Wed, 28 Mar 2012 19:20:20 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> So the meaning of my question is that you cannot critize a program that
> uses side effects changing a buffer for not being a functional program,
> because a program in a purely functionnal programming language would do
> exactly the same, by implementing a buffer monad.

There's a very big difference: in a language like Haskell, some
functions use the monad, while others don't and that is reflected in the
type so you have to know (and the type tells you) which ones do and
which ones don't in order to know how to call them.

In Elisp, there is no such distinctions, so it's like having all
functions use the monad.  E.g. any function may change global vars, the
selected window, the current-buffer, the state of any buffer, the
match-data, ...


        Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]