Re: nested functions

Tommy Thorn <foobar@nowhere.void>
8 Sep 2006 12:23:50 -0400

          From comp.compilers

Related articles
[5 earlier articles]
Re: nested functions (2006-08-31)
Re: nested functions (Tommy Thorn) (2006-08-31)
Re: nested functions (Marco van de Voort) (2006-09-06)
Re: nested functions (Tommy Thorn) (2006-09-06)
Re: nested functions (Jatin Bhateja) (2006-09-08)
Re: nested functions (Karsten Nyblad) (2006-09-08)
Re: nested functions foobar@nowhere.void (Tommy Thorn) (2006-09-08)
Re: nested functions (2006-09-08)
Re: nested functions (Chris Dollin) (2006-09-08)
| List of all articles for this month |

From: Tommy Thorn <foobar@nowhere.void>
Newsgroups: comp.compilers
Date: 8 Sep 2006 12:23:50 -0400
Organization: Sonic.Net
References: 06-08-140 06-09-010
Keywords: functional, design
Posted-Date: 08 Sep 2006 12:23:50 EDT

Jatin Bhateja wrote:
> According to me GCC nested functions are not same as nested functions
> in functional languages as these languages are dynamically scoped
> languages

You probably need to distrust your reference then, as functional
languages are not in fact dynamically scoped.

Dynamic scoping is largely out of favor by now, only surviving in few
places such as Common Lisp and Emacs Lisp.

What we have been discussion here is static scope and yes, GCC's nested
functions are exactly the same. A limitation though: GCC's nested
functions doesn't generally allow for pointers to inner functions to be
applied after the outer function has returned. A real functional
language have no such restriction.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.