create/destroy name change proposal
Tim Tautges
tautges at mcs.anl.gov
Sat May 8 17:18:23 CDT 2010
Create/destroy sounds fine to me.
- tim
Mark Miller wrote:
> 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
--
================================================================
"You will keep in perfect peace him whose mind is
steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Argonne National Laboratory
(tautges at mcs.anl.gov) (telecommuting from UW-Madison)
phone: (608) 263-8485 1500 Engineering Dr.
fax: (608) 263-4499 Madison, WI 53706
More information about the tstt-interface
mailing list