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: Jon S Anthony Subject: Re: Depending on passing mechanism Date: 1997/10/15 Message-ID: #1/1 X-Deja-AN: 281057945 References: <622b4t$nhe$1@gonzo.sun3.iaf.nl> Distribution: world Original-Sender: jsa@synquiry.com Organization: PSINet Newsgroups: comp.lang.ada Date: 1997-10-15T00:00:00+00:00 List-Id: hbaker@netcom.com (Henry Baker) writes: > There are 3 solutions, any of which is better than the current Ada 'non > deterministic' solution. I pretty much agree - certainly with respect to limited types. > 1. _Always_ pass by reference. This can be forced in C/C++ by > certain coding styles. Any aliasing is assumed to be > programmer-intended, and has a relatively simple programming model. > (You may have to liberally sprinkle 'volatile'-type thingy's around > as well.) There is a certain cost, but on modern microprocessors > the cost is not exorbitant, and certainly less than the cost of a > 777. Right. Again, certainly wrt limited types. You can "force this" in Ada95 now with 'Access. This is basically what I have done in the GC subsystem suite that I have constructed in order to get around the very "Baker in out side effect problem" described in a couple of your papers. > 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. Certainly this stuff is interesting. I'm not quite sure how it would have fit into Ada. > The NIL/Hermes people tried to get people in the Ada community to pay > attention, but they were completely ignored, and Ada95 suffered for it. Did you actually propose something along these lines during Ada9X??? /Jon -- Jon Anthony STL, Belmont, MA 02178, 617.484.3383 "Nightmares - Ha! The way my life's been going lately, Who'd notice?" -- Londo Mollari