create/destroy name change proposal
Mark Miller
miller86 at llnl.gov
Fri May 7 12:48:52 CDT 2010
We've seen create/destroy or new/del pairings as options for the methods
that bring objects into being from non-being and return them from being
to non-being.
In my proposal, I stuck with create/destroy as that appeared to be the
majority usage. But, new/del works for me as well. At the same time,
new/del very strongly suggest memory management implications even more
so than create/destroy do. I think that can lead to more confusion.
I think it is going to be way too common a belief that new/del in fact
free up memory when the group consensus seems to be that the
specification CANNOT require that and the memory management behavior
implications will very likely vary with implementation (I am drafting an
email on that topic as well but have yet to send it because I am still
somewhat stupefied by what others have written).
So, I'd argue create/destroy are maybe a tiny bit less likely to lead to
that confusion. But, maybe there is another word pairing that would be
even better on this point (e.g. declare/retract as in
iMesh_declareMesh/iMesh_retractMesh -- not a serious proposal but you
can get my meaning that such function names result in little or no
expectation regarding memory management behavior).
Mark
On Fri, 2010-05-07 at 10:22, Jason Kraftcheck wrote:
> Devine, Karen D wrote:
> > While we are changing names, let's clear up the confusion between "mesh
> > instance" and "mesh." These functions don't create/destroy a "mesh"; they
> > create/destroy a "mesh instance" (i.e, a mesh database). Many meshes can be
> > stored in a mesh instance, but we expect that in most cases, only one mesh
> > instance will be used.
> >
> > How about
> > iMesh_newMesh --> iMesh_createMeshInstance
> > iMesh_dtor --> iMesh_destroyMeshInstance
> >
> > Or, even better, following the example of iMesh_load and iMesh_save,
> > iMesh_newMesh -->iMesh_create
> > iMesh_dtor --> iMesh_destroy
> >
> > Of course, I'd be happy to replace the word "instance" with "database"; any
> > takers? :)
> >
>
> It's both: an instance of a database.
>
> How about iMesh_createInstance and iMesh_destroyInstance or
> iMesh_newInstance and iMesh_delInstance?
>
> - jason
--
Mark C. Miller, Lawrence Livermore National Laboratory
================!!LLNL BUSINESS ONLY!!================
miller86 at llnl.gov urgent: miller86 at pager.llnl.gov
T:8-6 (925)-423-5901 M/W/Th:7-12,2-7 (530)-753-851
More information about the tstt-interface
mailing list