comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Depending on passing mechanism
Date: 1997/10/19
Date: 1997-10-19T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.3.96.971019132229.3201B-100000@shell5.ba.best.com> (raw)
In-Reply-To: 62ckao$827@mulga.cs.mu.OZ.AU


On 19 Oct 1997, Fergus Henderson wrote:
> Brian Rogoff <bpr@shell5.ba.best.com> writes:
> >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.

By laziness, I assume Fergus here means that Haskell uses lazy evaluation, 
(expressions are not evaluated until their values are needed) not that
Haskell compiler writers are a lazy bunch :-).

> 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
> <http://www.cs.mu.oz.au/mercury>.

OK, reading about Mercury was on my "to do" list, I guess now is the time. 

> How close do you have to get to be "comparable"?

No "distributed overhead", by which I mean a program not using "unique
modes" is not any worse off than it would be if there were no unique modes 
at all, modulo increased compile time if it isn't too much. 

Mercury is a logic programming language; would you use it for applications 
which require lots of in place array manipulation (numerical linear
algebra, image proceesing, raster graphics, ...)? I'll read some of your 
papers; I just want to get a sense of whether Mercury is a very general 
purpose compiled language (like Ada or C++) or if it is mostly for
symbolic processing.
 
> >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.

Yes, that makes much more sense, especially considering (negatively) Ada's 
limited types.

> Some work would be required to specify the semantics precisely...

What I worry about is that there might be odd feature interactions. The
devil is in the details I suppose.

-- Brian






  reply	other threads:[~1997-10-19  0:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-13  0:00 Depending on passing mechanism Andre Spiegel
1997-10-13  0:00 ` Matthew Heaney
1997-10-14  0:00 ` Robert Dewar
1997-10-14  0:00   ` Henry Baker
1997-10-15  0:00     ` JP Thornley
1997-10-15  0:00     ` Geert Bosch
1997-10-15  0:00       ` Henry Baker
1997-10-15  0:00         ` Jon S Anthony
1997-10-15  0:00         ` Robert Dewar
1997-10-16  0:00         ` Brian Rogoff
1997-10-17  0:00           ` Henry Baker
1997-10-18  0:00             ` Brian Rogoff
1997-10-18  0:00               ` Matthew Heaney
1997-10-19  0:00                 ` Brian Rogoff
1997-10-21  0:00                   ` Robert A Duff
1997-10-22  0:00                     ` Robert Dewar
1997-10-22  0:00                       ` Brian Rogoff
     [not found]                         ` <dewar.877601826@merv>
1997-10-23  0:00                           ` Brian Rogoff
1997-10-23  0:00                       ` Henry Baker
1997-10-23  0:00                     ` Brian Rogoff
1997-10-19  0:00               ` Fergus Henderson
1997-10-19  0:00                 ` Brian Rogoff [this message]
1997-10-20  0:00                   ` Fergus Henderson
1997-10-20  0:00                 ` Henry Baker
1997-10-20  0:00                   ` Tucker Taft
1997-10-21  0:00                     ` Geert Bosch
1997-10-18  0:00             ` Fergus Henderson
1997-10-15  0:00       ` Robert Dewar
1997-10-15  0:00         ` Robert Dewar
1997-10-17  0:00           ` Andre Spiegel
1997-10-17  0:00             ` Henry Baker
1997-10-17  0:00               ` Robert I. Eachus
1997-10-17  0:00               ` Jon S Anthony
1997-10-21  0:00               ` Robert A Duff
1997-10-21  0:00                 ` Peter Hermann
1997-10-22  0:00                   ` Robert A Duff
1997-10-22  0:00                     ` Brian Rogoff
1997-10-22  0:00                 ` Henry Baker
1997-10-21  0:00                   ` Robert Dewar
1997-10-22  0:00                   ` Jon S Anthony
1997-10-22  0:00                   ` Brian Rogoff
1997-10-15  0:00         ` Brian Rogoff
1997-10-19  0:00           ` Robert Dewar
1997-10-22  0:00             ` Henry Baker
1997-10-21  0:00     ` Robert A Duff
1997-10-22  0:00       ` Henry Baker
1997-10-21  0:00         ` Matthew Heaney
1997-10-22  0:00           ` Simon Wright
1997-10-23  0:00           ` Henry Baker
1997-10-23  0:00             ` Pat Rogers
1997-10-24  0:00             ` Robert Dewar
1997-10-23  0:00         ` Robert A Duff
1997-10-21  0:00   ` Keith Thompson
1997-10-14  0:00 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox