|[5 earlier articles]|
|Re: nested functions email@example.com (2006-08-31)|
|Re: nested functions firstname.lastname@example.org (Tommy Thorn) (2006-08-31)|
|Re: nested functions email@example.com (Marco van de Voort) (2006-09-06)|
|Re: nested functions firstname.lastname@example.org (Tommy Thorn) (2006-09-06)|
|Re: nested functions Jatin_Bhateja@mentor.com (Jatin Bhateja) (2006-09-08)|
|Re: nested functions email@example.com (Karsten Nyblad) (2006-09-08)|
|Re: nested functions firstname.lastname@example.org (Tommy Thorn) (2006-09-08)|
|Re: nested functions email@example.com (2006-09-08)|
|Re: nested functions firstname.lastname@example.org (Chris Dollin) (2006-09-08)|
|From:||Tommy Thorn <email@example.com>|
|Date:||8 Sep 2006 12:23:50 -0400|
|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
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.
Return to the
Search the comp.compilers archives again.