From: David Alan Black Date: 2001-11-22T04:06:34+09:00 Subject: [ruby-talk:26061] Re: call_myself Hello -- On Thu, 22 Nov 2001, 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 see what you're getting at, but I think that if there are so many lines of code in a method that you can't remember the method's name, it's probably time for some refactoring :-) David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav