Article View: comp.sw.components
Article #94Re: Moving things in and out of containers
From: William Thomas Wolfe, 2847
Date: Mon, 18 Sep 1989 17:51
Date: Mon, 18 Sep 1989 17:51
21 lines
1421 bytes
1421 bytes
>The classic approach would be to copy-in and copy-out the contents
>of such containers, but simply passing pointers to contents is
>often much faster.
There are two approaches:
1) Call it a container of objects. In this case, the semantics
are to store a copy, and the programmer may well rely on this,
perhaps destroying or modifying the original while relying on
the container to keep the earlier version handy.
2) Call it a container of pointers. In this case, the semantics
are to store a pointer, and the programmer must refrain from
destroying the original.
What we should NOT do is allege that we have a container of objects
when in reality we have a container of pointers; the two are very
different concepts with respect to the effects of object modification.
Bill Wolfe, wtwolfe@hubcap.clemson.edu
Technical Details
Message-ID:
<6494@hubcap.clemson.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cica!gatech!hubcap!billwolf%hazel.cs.clemson.eduReferences:
<6176@pt.cs.cmu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cica!gatech!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) Newsgroups: comp.sw.components Subject: Re: Moving things in and out of containers Message-ID: <6494@hubcap.clemson.edu> Date: 18 Sep 89 17:51:25 GMT References: <6176@pt.cs.cmu.edu> Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu Lines: 21