Talk:Anonymous recursion: Difference between revisions

m
 
(2 intermediate revisions by the same user not shown)
Line 221:
::: This was created by Abu in November - can you way in.
:::: Well, the author listed 3 disadvantages, the first two are about the namespace issue; the third one is, IMO, bogus, because immediately after saying "interrupting program flow", the Y combinator is suggested, which interrupts code flow like there's no tomorrow. I think most examples are fine, although some are doing the task for the task's sake (such as the Go Y combinator solution) with no practical benefit. As it stands, maybe only a few examples need to be marked incorrect, while others do show some useful techniques. It never hurts to clarify the task, though. --[[User:Ledrug|Ledrug]] 23:27, 20 July 2011 (UTC)
 
== Task description is a bit childish ==
 
While I think the task is interesting, as a few languages permit this directly or at least clean workarounds, the arguments given are not very serious:
 
* ''You have to think up a name, which then pollutes the namespace'': if thinking up a name is a problem, consider another activity.
* ''Function is created which is called from nowhere else'' : It's called once. For some functions, it's enough to justify them. If it's really a problem, many languages have a way to make a function invisible from outside a given scope (for instance nested functions, static functions or namespaces), and even if there is no such thing, it's easy to add som prefix that make it very clear the function has "internal purpose".
* ''The program flow in the source code is interrupted'': that's the point of any flow control structure, and any function call. Again, if it's a problem, consider another activity.
 
I understand that making a program readable is important (it's one of my top priorities when writing programs, because I know ''I'' won't be able to maintain the program otherwise). However, it's silly to invent a problem where there is not really one. Thinking up a name and taking care of the program flow are basic tasks. Recursion is not adding complexity here. On the contrary, it usually simplifies things.
 
[[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 15:19, 3 March 2019 (UTC)
1,336

edits