[Top][All Lists]

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

Re: Return

From: David Kastrup
Subject: Re: Return
Date: Tue, 07 Dec 2010 23:15:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>>> Actually, I'm considering to disallow non-top-level defuns in
>>>> lexical-scope mode, just because it's a good opportunity to introduce
>>>> such "breakage" and because non-top-level defuns are bugs in 99% of
>>>> the cases (in Elisp).
>>> I presume by "non-top-level defun" you mean "defun inside a function",
>>> not "defun inside a form"...
> Yes.
>> There are lots of reasons for doing a defun inside of a function.  One
>> important point of Lisp is making it easy to create code
>> programmatically.
> There's `fset' for that.
>> I don't understand the "bugs in 99% of the cases", I could hardly
>> imagine any situation where a defun is used inside of a form
>> unintentionally,
> That's because you understand Elisp.  many Elisp programmers don't.

I think you are confusing "unintentionally" with "unwisely".  I think it
is presumptuous to assume as a compiler writer that one can make a
compiler make better decisions than any other programmer, without even
knowing the problem in advance.  That's somewhat above believing to be
able to write a program passing the Turing test.

David Kastrup

reply via email to

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