What is open recursion?

前端 未结 4 498
青春惊慌失措
青春惊慌失措 2021-02-01 16:34

What is open recursion? Is it specific to OOP?

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

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-01 17:09

    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. "

提交回复
热议问题