Subject: Recycling

From: [email-masked] (Gustavo Glusman)
Date: Tue, 14 Sep 1993 04:23:10 -0700

I noticed the following:

#630:"_recycle"   this none this
 1:  set_task_perms(caller_perms());
 2:  if (this.recreate_enabled)
 3:    return $recycler:(verb)(@args);
 4:  else
 5:    return recycle(@args);
 6:  endif

 recreate_enabled        .Gustavo (#57967)     r c    1

This means, any child of $builder can decide that his/her .recreate_enabled
looks nicer with a 0, and hence every recycle s/he does, leaves an invalid
object.

What is this good for?
Is there any problem with leaving invalid objects (holes?) in the dbase?
Is it better not to have them?
I wrote a simple verb to fill all these holes...

@verb me:@validate none none none rdx
@prog me:@validate
error=0;
new=create(#1);
if (!valid(new))
  player:tell("Couln't create a new object.");
  return;
endif
filled=renumber(new);
validated={filled};
while (new!=filled && !error)
  reset_max_object();
  new=create(#1);
  if (valid(new))
    filled=renumber(new);
    validated=setadd(validated,filled);
  else
    player:tell("Couldn't create a new object.");
    error=1;
  endif
endwhile
for o in (validated)
  $recycler:_recycle(o);
endfor
player:tell("Validated ",length(validated)," invalid objects.");
.

Could this do something dangerous? Is there any simpler way?

BTW, wouldn't MOOcode gain by implementing Pascal's structure:
 repeat <statements> until <condition>;
The code I brought before would use this gladly.

Gustavo Glusman -- [email-masked]

---

From: Judy Anderson <[email-masked]>
Date: Tue, 14 Sep 1993 18:53:57 -0700

The point of .recreate_enabled is precisely to allow moo users to
choose whether they get brand new objids when they create and really
destroy their objects when they recycle, or whether they participate
in the re-use pool.  See "deliver #9118 to me about numbers" on
LambdaMOO for why re-use is bad.  Me, I just don't want to see six
digit numbers in my lifetime.