Recursion introduction

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m
Line 5: Line 5:
 
Johnson and Foote call this practice recursion introduction despite the fact that it may not introduce "real" recursion because the method appears to be recursive.
 
Johnson and Foote call this practice recursion introduction despite the fact that it may not introduce "real" recursion because the method appears to be recursive.
  
According to Johnson and Foote, the benefit of recursion introduction is to help programmer to decide what operation should be a method.
+
According to Johnson and Foote, the benefit of recursion introduction is to help programmers decide what operations should be methods.
  
 
[[Category:Johnson and Foote's heuristics]]
 
[[Category:Johnson and Foote's heuristics]]

Revision as of 08:28, 27 September 2009

Giving related messages similar names, even if they have different parameters.

When an operation needs the method in one class to communicate with a method in another class, then the interface of these two class (the method) should be named the same. If it happens to be the case where such two methods in the same class, then a logical recursive method is formed, this is defined as recursion introduction by Johnson and Foote.

Johnson and Foote call this practice recursion introduction despite the fact that it may not introduce "real" recursion because the method appears to be recursive.

According to Johnson and Foote, the benefit of recursion introduction is to help programmers decide what operations should be methods.

Personal tools