[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Return
From: |
Fren Zeee |
Subject: |
Re: Return |
Date: |
Wed, 22 Dec 2010 21:39:30 -0800 |
On Fri, Dec 10, 2010 at 12:28 AM, Stephen J. Turnbull
<address@hidden> wrote:
> Stefan Monnier writes:
> > >> > There are lots of reasons for doing a defun inside of a function.
> > >> Give me examples and I'll tell you if I consider them as
> > >> valuable enough.
> > > Anything you would use `require' for inside a function. Betcha find a
> > > dozen or more instances of require-in-a-function in Gnus alone.
> >
> > Irrelevant: the defuns in the loaded file are defined at the top-level
> > even if the require is called from within a function.
>
> Irrelevant: the defuns in the function are defined at the top-level
> even though defun is called from within a function.
In this case it is helpful to allow nested defuns.
Most code is developed in build-fix method as Paul Graham has
explained very well.
For making modules, one puts simply a wrapper and want the minimal to
edit and move things around. An auxilary function then gets nested. I
do this often in a language that is lisp under a different label.
> My point is that you could just as well do the defuns inside the
> function as in a require'd file. Much of the time it makes sense to
> split them out into a file, of course, but I don't see any good reason
> why that should be enforced if the author would prefer to put her
> defuns in a function.
>
> defun is always at top level, right? If I want a local function
> (which I do quite frequently) I use flet.
>
>
>
- Re: Return, (continued)
- Re: Return, Stefan Monnier, 2010/12/06
- Re: Return, Miles Bader, 2010/12/06
- Re: Return, David Kastrup, 2010/12/07
- Re: Return, Stefan Monnier, 2010/12/07
- Re: Return, David Kastrup, 2010/12/07
- Re: Return, Fren Zeee, 2010/12/08
- Re: Return, Stefan Monnier, 2010/12/09
- Re: Return, Stephen J. Turnbull, 2010/12/09
- Re: Return, Stefan Monnier, 2010/12/09
- Re: Return, Stephen J. Turnbull, 2010/12/10
- Re: Return,
Fren Zeee <=
- Re: Return, Stephen J. Turnbull, 2010/12/07
- Re: Return, David Kastrup, 2010/12/07
- Re: Return, Stephen J. Turnbull, 2010/12/07
- Re: Return, tomas, 2010/12/07
- Re: Return, MON KEY, 2010/12/06
- Re: Return, Stephen J. Turnbull, 2010/12/07
- Re: Return, David Kastrup, 2010/12/07
- Re: Return, Stephen J. Turnbull, 2010/12/07
- Re: Return, Richard Stallman, 2010/12/08
- Re: Return, Daniel Colascione, 2010/12/10