Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is open recursion?

What is open recursion? Is it specific to OOP?

(I came across this term in this tweet by Daniel Spiewak.)

like image 930
missingfaktor Avatar asked May 22 '11 15:05

missingfaktor


People also ask

What is open recursion in programming?

Open recursion. Another handy feature offered by most languages with objects and classes is the ability for one method body to invoke another method of the same object via a special variable called self or, in some langauges, this.

Why is open recursion important in OOP?

Open recursion allows to call another methods of object from within, through special variable like this or self. Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Which allow open recursion?

1 Answer. For explanation: Use of this pointer allows an object to call data and methods of itself whenever needed.


1 Answers

just copying http://www.comlab.ox.ac.uk/people/ralf.hinze/talks/Open.pdf: "Open recursion Another handy feature offered by most languages with objects and classes is the ability for one method body to invoke another method of the same object via a special variable called self or, in some langauges, this. The special behavior of self is that it is late-bound, allowing a method defined in one class to invoke another method that is defined later, in some subclass of the first. "

like image 91
IttayD Avatar answered Sep 22 '22 23:09

IttayD