From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-11-22T04:14:25+09:00 Subject: [ruby-talk:26062] Re: call_myself In article <3BFBF664.9080700@pinkjuice.com>, Tobias Reif wrote: >Michael Neumann wrote: > > >>>Sometimes, this is not obvious, because there might me a lot of other code. >>> >>>def some_method arg >>> # many LOC >>> # some_method mod_arg >>>end >>> >>>Is there something that makes it clear that the method calls itself? >> >> But do we really need this? I've never had problems with unwanted >> recursions. > > >me neither. It's not about unwanted recursions: it's about making it >clearer what happens in the code, to make it more accessible, and easier >to understand. > >If in a method def, after *many* LOC, there is a call to the method >itself, it is not obvious that it's a call to itself. > I'm not sure your 'call_myself' proposal would make it any clearer 'after *many* LOC'. If the whole function doesn't fit on one page of your editor then you'd still have to go looking to see what 'call_myself' is calling. Phil