Talk:Nested function
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||
|
To-do list for Nested function:
|
C syntax
editI was under the impression that the c language didn't support nested functions... Fresheneesz 21:01, 7 December 2006 (UTC)
- I does not, but C syntax is only syntax, not the same as legal C code. I was contemplating the word "hypothetical" when i wrote it, but as there is at least one "C syntax programming language", the D language, supporting nested functions, that word would probably be somewhat misleading. /HenkeB 05:54, 24 December 2006 (UTC)
Actually I just tested minGW's gcc - and it does it fine. But when I tried compiling a c program (something.c) with dev c++, it gave me this error "in make_decl_rtl varasm.c: 752
". Compiling it as a c++ program (something.cpp ), it refused the declaration entirely. Fresheneesz 21:25, 7 December 2006 (UTC)
- To make things really confusing, the gnu c compiler (as you have discovered) actually supports nested functions even in C programs, but this is a non-standard language extension. /HenkeB 05:54, 24 December 2006 (UTC)
Formatting
editI was under the impression that ==heading name== was the usual format for top-level headings, and the convention followed by most articles (as per WP:HEAD). Is this incorrect, or is this article just going against convention? If the latter, why? JoeKearney 20:19, 29 March 2007 (UTC)
- I agree with you. I'm going to perform the change so that the article formatting will comply to the Wikipedia formatting guidelines. --Antonielly (talk) 23:06, 4 December 2008 (UTC)
Nesting dolls
editI somehow fail to understand what have "Nesting dolls (Japanese version)" to do with a nested function. Furthermore, there is a separate page for nesting dolls. Cooldemo (talk) 11:32, 25 November 2008 (UTC)
- I completely agree with you. The only relationship of that figure with the concept of "nested function" is the concept of nesting. This is a very weak relationship. I think that figure should belong to the article Matryoshka doll, not to this. I vote for transferring that figure to the Matryoshka doll article. (I prefer a transfer (move) operation, not simply a delete.) --Antonielly (talk) 23:02, 4 December 2008 (UTC)
- I agree as well and have removed the image. fraggle (talk) 14:50, 25 April 2009 (UTC)
in Mathematics...
editThe article begins saying, "In computer programming..." but it seems there should be at least some mention or cross reference to the use of nested functions in mathematics. Some very simple nested functions show up in the SAT (exam).
Where (in mathematics) do they get used mainly? Maybe add some references like these:
I was thinking of adding Python and Ruby to the Examples section; would that be TMI? [based on history seems to be from Chatul]
- Knock yourself out :) I would suggest Python and not Ruby due to their respective popularities. And keep it short. The example for C++ using lambdas is too long ... not to mention off topic since it doesn't use nested functions. Stevebroshar (talk) 13:13, 7 April 2024 (UTC)
- I wound up adding PL/I and Python examples. In the process, I noticed that the simple examples don't use local variables. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 14:02, 9 April 2024 (UTC)