comp.lang.ada
 help / color / mirror / Atom feed
From: "Grein, Christoph" <christoph.grein@eurocopter.com>
Subject: Implicit Instantiations - was: Re: Why is Ada NOT a good choice for a beginner to programming?
Date: Mon, 13 Jan 2003 07:05:29 +0100 (MET)
Date: 2003-01-13T07:05:29+01:00	[thread overview]
Message-ID: <mailman.1042438382.941.comp.lang.ada@ada.eu.org> (raw)

From: kcline17@hotmail.com (Kevin Cline)

> Grein writes:
> 
>   But the request to have full dimensional checking persists as can be seen
>   from the pertinent discussions in newsgroup Comp.Lang.Ada. There are two
>   basic ways one can try to solve the problem, either by adding to the
>   numeric value its dimension as attribute, or by using different types for
>   different dimensions.  Since the first method is runtime-consuming,
>   whereas the second one is only compiletime-consuming, all effort naturally
>   concentrates on the second method.   This is doomed to fail
>   as is shown in the paper cited above - although a plethora of overloaded
>   operations is used, the result is not really satisfactory.
>   Physical equations with all their powers and roots evade these attempts.
> 
> In short, Ada's requirement for explicit generic instantiation repels
> attempts to create a compile-time verified system of dimensional types,
> and Grein gave up on attempts to achieve compile-time type safety.
> 
> C++ does not have this problem, and compile-time type safety is
> achieved in a fairly obvious way.

This C++ feature pleases me so that I'm apt to wish something like it were 
available in Ada.

However I have not thought about all implications this would induce in 
connection with all other features in Ada, so this might turn out to be a kind 
of Pandora's box.

It is true, there are some places in Ada where implicit declarations or type 
conversions are done, but implicit instantiations are as yet nowhere.



             reply	other threads:[~2003-01-13  6:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-13  6:05 Grein, Christoph [this message]
2003-01-14  6:04 ` Implicit Instantiations - was: Re: Why is Ada NOT a good choice for a beginner to programming? Richard Riehle
2003-01-14 20:25   ` Kevin Cline
2003-01-14 21:12   ` Hyman Rosen
  -- strict thread matches above, loose matches on Subject: below --
2003-01-14  6:29 Grein, Christoph
2003-01-15  4:35 ` Richard Riehle
replies disabled

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