On Fri, May 25, 2012 at 1:34 PM, sclytrack <sclytrack@iq87.fr> wrote:
On 05/25/2012 05:42 PM, Steven Schveighoffer wrote:
On Fri, 25 May 2012 11:37:52 -0400, Steven Schveighoffer
<schveiguy@yahoo.com> wrote:

On Fri, 25 May 2012 11:28:07 -0400, Alex Rønne Petersen
<alex@lycus.org> wrote:

On 25-05-2012 17:23, Steven Schveighoffer wrote:
On Fri, 25 May 2012 11:03:33 -0400, Alex Rønne Petersen
<alex@lycus..org> wrote:

On 25-05-2012 16:56, Steven Schveighoffer wrote:

Wow, you're right, it's not documented. That should be fixed!

Before we do, we should deprecate clear and rename it to finalize,
though.

I don't like finalize because it's not a finalizer.

I think we should mimic other languages that have a finalizer and a
deterministic dispose function.

-Steve

But it calls rt_finalize...?

Yeah, because non-deterministic destruction is part of deterministic
destruction.

finalize -> destroy non-gc resources
dispose -> 1. do deterministic destruction involving possible GC
resources 2. call finalize.

e.g. a buffered file:

finalize -> close the file handle
dispose -> flush the GC allocated buffer into the handle, then close
the handle

I take it back, dispose is no good. That should be the name of the
deterministic destructor in the object.

Now I don't have a good name. Finalize isn't right, and neither is
dispose...

-Steve

blank, destroy, trash, dump, zero, bleach, cleanup,
sanitize, burn, nuke, eject, jetisson, discard,
landfill, waste, litter, debris, recycle, obliterate,
annihilate, eradicate, expunge, finish, ravage, wipe,
zap, abolish, decimate, demolish, massacre, murder,
ruin, slaughter, quash, scrub, splat



I'm partial to defenestrate().