Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!wuarchive!mailrus!ncar!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: Assignment in Ada Message-ID: <6556@hubcap.clemson.edu> Date: 23 Sep 89 21:13:43 GMT References: Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu Lines: 24 From ted@nmsu.edu (Ted Dunning): > but where does this leave ada? no overloading or forbidding > assignment leaves the writer of a reliable reference counting adt in a > real pickle. The fact that it is not possible in Ada 83 to overload ":=" has not posed practical difficulties, since it is standard practice to simply require the generic parameter structure with procedure Assign (Target : in out Object_Type; Source : in Object_Type) is <>; thus substituting "Assign" for ":=" in a straightforward way. There remains a technical problem in that we can't use "Assign" to initialize variables at the moment of creation, which is probably why this is one of the more popular Ada 9X revision requests. I wouldn't use either form of assignment to do a reference-counting system, though... it's too easy to create unkillable garbage if one process dies while still holding claim to a reference. Bill Wolfe, wtwolfe@hubcap.clemson.edu