6 ms·
It seems that the only thing that consistently amuses hackers is recursion.
by die_sekte 16y ago
It seems that the only thing that consistently amuses hackers is recursion.
- mkr-hn 16y agoIt's the iteration sensation.
- illumen 16y ago10 PRINT "It seems that the only thing that consistently amuses hackers "; 20 PRINT "is the only thing that consistently amuses hackers "; 30 GOTO 20
- polynomial 16y agoIf you mean consistently amusing recursion, then yes.
- sammyo 16y ago"To iterate is human, recurse devine" -Anon
- eru 16y agoIteration is just a special case.
- sesqu 16y agoWhen you hit Turing completeness, special casing is no longer a useful exercise.
- eru 16y agoCould you explain what you want to say? I mean, iteration is a special case of recursion. Some languages [1] need special syntax constructs for iteration, like `while' or `for', because their support for recursion is broken. [1] OK, most.
- sesqu 16y agoIteration: until condition iterate state=update(state). Recursion: recursive(state)=if atomic then state else recursive(refined(state)). condition=atomic, update=refined. One is not a special case of the other; they are just different models for the same process (one is top-down, the other bottom-up). See also objects vs. closures.
- eru 16y agoTo quote Structure and Interpretation of Computer Programs (http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html#%_sec_1.2.1 http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html...): [...] most implementations of common languages (including Ada, Pascal, and C) are designed in such a way that the interpretation of any recursive procedure consumes an amount of memory that grows with the number of procedure calls, even when the process described is, in principle, iterative. As a consequence, these languages can describe iterative processes only by resorting to special-purpose ``looping constructs'' such as do, repeat, until, for, and while. The implementation of Scheme we shall consider in chapter 5 does not share this defect. It will execute an iterative process in constant space, even if the iterative process is described by a recursive procedure. An implementation with this property is called tail-recursive. With a tail-recursive implementation, iteration can be expressed using the ordinary procedure call mechanism, so that special iteration constructs are useful only as syntactic sugar.
- fizx 16y agoIn some sense, it's what makes us unique. Is CS the only discipline that deals with recursion on a regular basis?
- edanm 16y agoI think there are other fields of Mathematics in which recursion plays some part (Mathematical Logic, for example).
- dhs 16y agoThere's recursive storytelling and poetry (the kind of stories/poems where, at the end, you find yourself looking at the beginning again). It's also possible to describe certain processes which occur as part of some mental disorders as recursive (e.g. the fear of fear; depression because of depression).
- eru 16y agoMathematics is full of recursion. Everywhere. The part of CS that deals with recursion is just a tiny corner of mathematics.
- oiuygtfrtghyju 16y agoWhat about writing about the history of histography? Would that be histography-histography or histography-histography-histography?
- sp332 16y agoIt's historiography and it's already sufficiently meta. It's in the set of all sets that contain themselves. (But does the set of all sets that do not contain themselves contain itself? That is the question :-)
- forensic 16y agoIt's SO true. I always laugh the hardest at recursive jokes.