From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f1111f1bf805022b X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Unconstrained type Unchecked_Deallocation Date: 2000/03/06 Message-ID: <8a1f4s$ho2$1@nnrp1.deja.com>#1/1 X-Deja-AN: 594012870 References: <8a0h55$qc5$1@nnrp1.deja.com> <38C3D82F.C9F81832@bton.ac.uk> X-Http-Proxy: 1.0 x36.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Mar 06 23:31:39 2000 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-03-06T00:00:00+00:00 List-Id: In article <38C3D82F.C9F81832@bton.ac.uk>, John English wrote: > Ted Dennison wrote: > > That ought to work just fine. However, I don't see the benifit of > > doing this over just naming the instantiation of > > Unchecked_Deallocation "Free" in the first place. They have the same > > parameter profile and the same mission. > > Possibly to avoid creating a dependence between the package spec and > Unchecked_Deallocation? Might make it easier to move to a different > allocation/deallocation regime at a later date, e.g. when porting... Assuming that in real life that code is split between the spec and body? That's a good possiblity. The best reason I could think of was the possibility that this is just an example of a routine that in real life also needs to contain some other cleanup code. But I find often with beginners they just don't know any better, so its best to point out inefficencies and possible alternate techniques. -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/ Before you buy.