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

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

Re: Defining functions within functions?


From: Emanuel Berg
Subject: Re: Defining functions within functions?
Date: Tue, 24 May 2016 17:43:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Barry Margolin <address@hidden> writes:

> If you have a local function, it can access
> variables in the calling function directly.
> If you move it out to a top-level function,
> you have to pass those variables
> as arguments.

Right, I didn't think of that but actually it
is even more confusing.

It is more clear to call the function at top
level, and pass it all it needs to do its job.

> And if the function being called needs to
> reassign the variable, you need to do that in
> the caller if you use a top-level function.

"reassign the variable"?

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 40 Blogomatic articles -                   


reply via email to

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