Idea: Recurse keyword.



Hello,

I am coding some recursive procedures and I keep forgetting to call the
correct recursion.

For example

procedure Bla( ... )
begin
if ... then
begin

end else
begin
Bla( ... );

Bla( ... );
end;

end;

Then I copy and paste this code to make another version:

procedure Bla1( ... )
begin
if ... then
begin

end else
begin
Bla( ... );

Bla( ... );
end;

end;

Then I forget to rename Bla to Bla1 which leads to stupid situations :)

So an idea to prevent this stupidity from happening is by introducing a new
keyword:

"Recurse"

Then I can code it like so:

procedure Bla( ... )
begin
if ... then
begin

end else
begin
Recurse( ... );

Recurse( ... );
end;
end;

Now when I copy and paste it:

procedure Bla1( ... )
begin
if ... then
begin

end else
begin
Recurse( ... );

Recurse( ... );
end;
end;

Recurse should now call Bla1... so then I can never make any more stupid
mistakes ;) :)

Bye,
Skybuck =)


.