[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Return
From: |
Stephen J. Turnbull |
Subject: |
Re: Return |
Date: |
Fri, 10 Dec 2010 17:28:23 +0900 |
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.
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, 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 <=
- Re: Return, Fren Zeee, 2010/12/23
- 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