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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,29fe9a340e0d180d X-Google-Attributes: gid103376,public From: hbaker@netcom.com (Henry Baker) Subject: Re: Depending on passing mechanism Date: 1997/10/17 Message-ID: #1/1 X-Deja-AN: 281890180 Sender: hbaker@netcom5.netcom.com References: <622b4t$nhe$1@gonzo.sun3.iaf.nl> Organization: nil Newsgroups: comp.lang.ada Date: 1997-10-17T00:00:00+00:00 List-Id: In article , Brian Rogoff wrote: > On Wed, 15 Oct 1997, Henry Baker wrote: > > In article <622b4t$nhe$1@gonzo.sun3.iaf.nl>, Geert Bosch > > wrote: > > > ... about non-determinism and Ada parameter passing ... > > > > > > Do you have a proposal to remove the non-determinism without affecting > > > performance and flexibility too much? I think many readers in this > > > group might be interested in such ideas, at least I am. > > > > > > Regards, > > > Geert > > > > 3. Add a new concept to your language: 'linear'/'unique' types. These > > objects are guaranteed to be singly referenced because this is enforced > > by the type system. Poof! No aliasing! This concept was pioneered by > > NIL/Hermes, and has recently been incorporated into some logical (prolog-like) > > languages and some functional languages ('Clean' from KU Leaven). There is a > > large and growing body of mathematics called 'linear logic' that puts linear > > types on a firm theoretical foundation. > > I remember reading something about NIL a long time ago (this is from Bell > Labs, right?) and their notion of "typestates", which I think what I > think you are talking about, and I thought that they stated that there was > a fairly significant performance overhead in their use, and hence they > wouldn't be really suitable in the role that you are proposing for them in > Ada. Anyone have different information? > > -- Brian NIL/Hermes was from IBM. There was no performance overhead that I heard of. On the contrary, by performing the typing analysis at compile time, there was no runtime overhead. NIL/Hermes was not doing rocket science, but merely doing 'right' what people in the real-time and OS communities had been doing for years already. NIL/Hermes put in type-checking to make sure that when something is supposed to be used/referenced only once, the compiler can prove this mathematically. I'll bet that nearly every Ada program has objects that are intended to be used/referenced only once, but since there is no compiler support for this notion, the software cannot be checked at compile time, and is vulnerable to programmers later doing 'maintenance'.