comp.lang.ada
 help / color / mirror / Atom feed
From: Richard D Riehle <laoXhai@ix.netcom.com>
Subject: Re: STL, Ada, C++ (Was Re: The Next Microsoft?)
Date: 2000/05/10
Date: 2000-05-10T00:39:23+00:00	[thread overview]
Message-ID: <8fab3r$642$1@slb6.atl.mindspring.net> (raw)
In-Reply-To: Pine.BSF.4.21.0005090756520.24683-100000@shell5.ba.best.com

In article <Pine.BSF.4.21.0005090756520.24683-100000@shell5.ba.best.com>,
	Brian Rogoff <bpr@shell5.ba.best.com> wrote:

>On Tue, 9 May 2000, Richard D Riehle wrote:

>> I wonder if there is a trade-off here between convenience and type
>> safety.  Ada tends to lean heavily in the direction of safety,
>> and automatic instantiation seems not quite as focused on that issue.
>
>Overloading, runtime dispatching, and "use clauses" don't seem quite
>as focused on safety either. The only way that automatic instantiation 
>is troubling is that in the case of a language like C++ it is undecidable, 
>I think in standard C++ they limit the depth of template expansion
>(Hyman?) and I imagine a similar solution would be needed for Ada.  

Overloading is resolved at compile time.  It is a little safer than run-time
dispatching, according to some practitioners.  Use clauses certainly can
be problematic with regard to visibility, but they generally do not obviate 
type safety.  Of course, Geoff Mendal's paper on this subject illustrates 
some of the concerns for use clauses with predefined types.  The question
I was raising was whether we would expect the same level of confidence 
from automatic instantiation we already expect from Ada's model of generic
instantiation.  

>> For example, the model for generic formal package parameters in Ada
>> forces the designer to create a generic signature package corresponding to
>> the parameter.  This makes automatic instantiation quite difficult to
>> achieve, but has the benefit of pretty thorough compile-time evaluation
>> of all the elements of the signature.  
>
>> The goals of C++ are different from those of Ada.    
>
>Programming languages don't have goals, people do. Languages are artifacts 
>that can and should be discussed dispassionately. 

Please excuse my inadvertant anthropomorphism of the languages.  Perhaps I 
should have said, "The goals of the C++ designers were different from those
of the Ada designers."  With that clarification, I doubt you would disagree
that there were some goals, at very minimum, a loose rationale, for the 
design of both languages under discussion.


>> Also,
>> those goals are intended to satisfy different levels of confidence in the
>> final product.  
>
>"C++ is deficient with respect to Ada in the safety critical realm"
>"C++ has automatic instantiation"
>"Therefore automatic instantiation is deficient ..."

Well, actually, I began my posting with a question.  I tried to phrase it
interrogatively, although I may have let myself slip into an assertion now
and then.  Let me try again.

Can we enjoy the same level of confidence in C++ automatic instantiation we
have come to expect from Ada genericity?   Having asked the question in that
way, I realize that some in the Ada community might point out that SPARK does
not support genericity because, for the designers of SPARK, even the conservative
approach of Ada to genericity does not carry sufficient guarantee of reliability.

>Your emotional rhetoric is unconvincing. Any language with type inference
>has a kind of automatic instantiation and "lack of safety" is not a 
>reasonable negative claim to make.

Yes, Brian.  I am well-known for my letting my passion override my dignity when
discussing technical concerns.  Sigh.  If I engage in future discussion on this
topic, I shall restrain myself from any comment without having first cleansed
myself of unruly emotions through the therapeutic agent of a cold shower.

Meanwhile, my question stands.

Richard Riehle
richard@adaworks.com
 




  parent reply	other threads:[~2000-05-10  0:00 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8eg37k$15n$1@nnrp1.deja.com>
     [not found] ` <8epkoa$b8b$1@nnrp1.deja.com>
     [not found]   ` <E$OcUgAHHIE5Ewfl@quik.freeuk.net>
     [not found]     ` <8eu0ob$7qv$1@nnrp1.deja.com>
2000-05-05  0:00       ` The Next Microsoft? Ray Blaak
2000-05-05  0:00         ` Mark Atwood
2000-05-05  0:00           ` Hyman Rosen
2000-05-05  0:00             ` Mark Atwood
2000-05-05  0:00               ` Hyman Rosen
2000-05-05  0:00                 ` Jon S Anthony
2000-05-05  0:00                   ` Hyman Rosen
2000-05-05  0:00                     ` Bill Greene
2000-05-06  0:00                       ` Ehud Lamm
2000-05-07  0:00                       ` STL, Ada, C++ (Was Re: The Next Microsoft?) Brian Rogoff
2000-05-08  0:00                         ` Florian Weimer
2000-05-08  0:00                         ` Robert Dewar
2000-05-07  0:00                           ` Brian Rogoff
2000-05-08  0:00                           ` Pascal Obry
2000-05-08  0:00                             ` Brian Rogoff
2000-05-08  0:00                               ` Robert Dewar
2000-05-08  0:00                                 ` Pascal Obry
2000-05-09  0:00                                 ` STL, Ada, C++ Harry Erwin
2000-05-09  0:00                                   ` Robert A Duff
2000-05-09  0:00                               ` STL, Ada, C++ (Was Re: The Next Microsoft?) Marin D. Condic
2000-05-09  0:00                                 ` Robert Dewar
2000-05-09  0:00                                   ` Marin D. Condic
2000-05-08  0:00                           ` Hyman Rosen
2000-05-08  0:00                             ` Brian Rogoff
2000-05-09  0:00                             ` Richard D Riehle
2000-05-09  0:00                               ` Brian Rogoff
2000-05-09  0:00                                 ` Hyman Rosen
2000-05-09  0:00                                   ` Robert A Duff
2000-05-09  0:00                                     ` Hyman Rosen
2000-05-09  0:00                                 ` Brian Rogoff
2000-05-10  0:00                                 ` Richard D Riehle [this message]
2000-05-10  0:00                                   ` Brian Rogoff
2000-05-05  0:00                     ` The Next Microsoft? Jon S Anthony
2000-05-05  0:00           ` Ayende Rahien
2000-05-05  0:00         ` Bobby D. Bryant
replies disabled

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