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

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

Re: Several beginner-questions


From: Lowell Gilbert
Subject: Re: Several beginner-questions
Date: Wed, 28 Mar 2012 19:20:16 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix)

Xah Lee <xahlee@gmail.com> writes:

> On Jul 27, 12:26 pm, David Kastrup <d...@gnu.org> wrote:
>> XahLee<xah...@gmail.com> writes:
>> > also note, to argue the fine details of what lang support what
>> > paradigm is a bit nutty, because they are not in any way close to
>> > mathematically defined. You can only go by practical experiences and
>> > consensus. Lisp, by all means, is functional langs, albeit absolutely
>> > not purely functional in any sense. It would be rather difficult, to
>> > write imperative code in lisp,
>>
>> Nonsense.  Emacs Lisp is the primordial example of mostly imperative
>> code written in Lisp: as an Editor, its main purpose is _modifying_
>> buffers by side effect.  It can also work with strings (which are
>> immutable for all practical purposes and you return just modified
>> copies: even though you can do aset on them in theory, nobody does) in a
>> more functional manner, but its main operations are buffers and
>> imperative modification.
>
> Dave, WHAT utter nonsense you? Emacs Lisp is a lisp. Buffer or no,
> still lisp. You forgot your roots? So, according to you, Perl is a
> lisp and Emacs lisp is imperative?? Is that your meaning so?

His point is technical and precise.  Emacs Lisp is used primarily to
create side effects.  That functions have no side effects is a primary
definition of functional programming.  Therefore, most Emacs Lisp
programs are not functional.

It's certainly possible to write functional programs in Emacs Lisp, just
as in any other Lisp.  But any program that uses side effects (changing
a buffer being one obvious example) is not a functional program.


-- 
Lowell Gilbert, embedded/networking software engineer
         http://be-well.ilk.org/~lowell/


reply via email to

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