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: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: Depending on passing mechanism Date: 1997/10/19 Message-ID: <62ckao$827@mulga.cs.mu.OZ.AU>#1/1 X-Deja-AN: 281722137 References: <622b4t$nhe$1@gonzo.sun3.iaf.nl> Organization: Comp Sci, University of Melbourne Newsgroups: comp.lang.ada Date: 1997-10-19T00:00:00+00:00 List-Id: Brian Rogoff writes: >On Fri, 17 Oct 1997, Henry Baker wrote: >> >> NIL/Hermes was from IBM. > >Right, my mistake. > >> 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. > >I'll have to find the ref where I thought I read about this. In any case, >simply having a strong static type system does not guarantee no runtime >overhead; you suggested the Haskell approach as a valid one. While Haskell >code looks nice on paper the current compiler implementations are far from >producing comparable code to gcc for similar problems. The differences in efficiency are mostly due to unrelated factors: - laziness - different coding styles Haskell code often allocates lots of garbage, makes significant use of higher-order functions, etc. But a language which does have some support for unique types and which generates code which is often comparable with gcc, assuming similar coding styles in the source code, is Mercury . How close do you have to get to be "comparable"? >What I would like >to be convinced is > >(1) An actual pseudo-Ada syntax for "unique" types in Ada. Starting from > there I could see exactly how your proposal would interact with the > the current Ada. Well, I'd go for unique modes, rather than unique types. In addition to "in", "out", and "inout", add "unique_in", "destructive_in", "unique_out", and "unique_inout", with semantics similar to the unique modes in Mercury. Some work would be required to specify the semantics precisely... -- Fergus Henderson | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.