comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada noob here! Is Ada widely used?
Date: Sun, 6 Jun 2010 13:45:48 +0200
Date: 2010-06-06T13:45:48+02:00	[thread overview]
Message-ID: <2o8vq76hpv1m.vs7m2beo23nz.dlg@40tude.net> (raw)
In-Reply-To: op.vdvk5jrdule2fv@garhos

On Sun, 06 Jun 2010 13:06:45 +0200, Yannick Duchêne (Hibou57) wrote:

> Le Sun, 06 Jun 2010 11:22:07 +0200, Dmitry A. Kazakov  
> <mailbox@dmitry-kazakov.de> a écrit:
>> But if you force yourself to instantiate earlier, you get a very fragile
> Don't see a reason why ; and this even seems contradictory to me: the  
> earlier you instantiate, the less complex it is. Or not ?

Less complex and more fragile, because of premature decisions to meet. The
package Generic_Complex_Types requires the type Real to instantiate. You
have to define this type, range, precision etc. Later on, if the choice
might appear wrong, you will have a huge problem, if the instance is widely
used. A typical solution is to pass the instance as a parameter of another
generics. Welcome to the Hell...

> An example objection could be, when a generic is used,  
> other ways may have been evaluated and excluded for some reasons.

Right, just like gotos.

> Or is  
> Ada missing something so that people don't have any other choice than  
> generic (generic as a fall-back) ? What could this other paradigm could  
> looks like then ?

Dynamic polymorphism, abstract types, interface inheritance, constraining
(discriminants), static functions.

> In the area of other choices, would automatic generation or simply copy be  
> a better choice (as this is one of the cases generics avoid) ? I feel it  
> would be even less usable.

Probably yes. Macro is a macro, even if you call it generics or template.

>> Add here that generics are non-testable. You can test instances, you
>> cannot generics. Then Ada has been drifting towards C++ in the sense
>> what promises gives you a successful compilation of the generic
>> body, little, very little, nothing...
> (another matter this one)
> This is not like if generics could be instantiated with anything.  
> Actually, this is not: you can require a formal parameter to be a discrete  
> type, to be derived from another type, etc.

Yes. The language of generics regarding its formal parameters:

C++: untyped
Ada: typed, types are built-in, no abstract/user types whatsoever
Must-be: ADT + OO

... too much work to invest into a meta language. Why not to concentrate on
the object language, i.e. on the core Ada type system?

> So some assertions can be made  
> on the validity of a generic's logic and implementation.

Some, but as I said Ada drifts towards less checks. You can (and will) get
errors upon instantiation even if actual parameters match the formals!

> Perhaps you are  
> requesting for more ways to constrain formal parameters ? (I would agree  
> with you, unless SPARK already support generics, which I have still not  
> tested so far).
> 
> Oops, I have implicitly replaced “testable” by “provable”, hope you don't  
> mind.

I do. If you'd make them provable you would need not to test. The problem
is that for generics provability is much harder than for the object
language. The same question again. Why not to concentrate on the core Ada
and integrate SPARK there?

To me generics is a dead end.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2010-06-06 11:45 UTC|newest]

Thread overview: 230+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-20 12:53 Ada noob here! Is Ada widely used? Duke Normandin
2010-05-20 13:59 ` Alex Mentis
2010-05-20 15:05   ` Pascal Obry
2010-05-20 15:27     ` Yannick Duchêne (Hibou57)
2010-05-20 15:30   ` Yannick Duchêne (Hibou57)
2010-05-20 18:58     ` Duke Normandin
2010-05-20 19:36       ` Manuel Gomez
2010-05-20 19:53         ` Duke Normandin
2010-05-20 21:20       ` Yannick Duchêne (Hibou57)
2010-05-20 23:17       ` Gautier write-only
2010-05-20 23:46         ` Yannick Duchêne (Hibou57)
2010-05-21 14:07           ` Duke Normandin
2010-05-21  0:30         ` Marc A. Criley
2010-05-21  2:17           ` Yannick Duchêne (Hibou57)
2010-05-21 20:34             ` Marc A. Criley
2010-05-21  5:18         ` Randy Brukardt
2010-05-22 14:54           ` Gautier write-only
2010-05-21 16:01         ` Duke Normandin
2010-05-22  9:57           ` Stephen Leake
2010-05-21  5:09     ` Randy Brukardt
2010-05-21 14:33       ` Duke Normandin
2010-05-20 19:06   ` Duke Normandin
2010-05-20 21:19     ` Yannick Duchêne (Hibou57)
2010-05-21  1:08   ` tmoran
2010-05-20 15:33 ` Yannick Duchêne (Hibou57)
2010-05-20 17:21 ` Jeffrey R. Carter
2010-05-20 18:49 ` Gautier write-only
2010-05-20 19:51   ` Duke Normandin
2010-05-20 21:05     ` Dmitry A. Kazakov
2010-05-20 22:58       ` Duke Normandin
2010-05-23  2:41         ` Yannick Duchêne (Hibou57)
2010-05-23 13:26           ` Duke Normandin
2010-05-23 16:50             ` Bruno Le Hyaric
2010-05-23 17:37               ` Duke Normandin
2010-05-23 20:32               ` Jeffrey R. Carter
2010-05-23 20:59                 ` Duke Normandin
2010-05-24  9:00                   ` Stephen Leake
2010-05-24  9:31                     ` Dmitry A. Kazakov
2010-05-24 13:10                       ` Duke Normandin
2010-05-25  2:07                         ` Stephen Leake
2010-05-25  2:02                       ` Stephen Leake
2010-05-25  9:05                         ` Dmitry A. Kazakov
2010-05-25 17:36                           ` Yannick Duchêne (Hibou57)
2010-05-25 18:50                             ` Warren
2010-05-26  7:16                           ` Stephen Leake
2010-05-26  8:17                             ` Dmitry A. Kazakov
2010-06-03  2:59                         ` Yannick Duchêne (Hibou57)
2010-06-03  7:23                           ` Niklas Holsti
2010-06-03  7:47                             ` Yannick Duchêne (Hibou57)
2010-06-04  9:09                               ` Stephen Leake
2010-06-04  9:08                           ` Stephen Leake
2010-06-04  9:27                             ` Brian Drummond
2010-06-04  9:40                             ` Dmitry A. Kazakov
2010-06-04 10:55                               ` Yannick Duchêne (Hibou57)
2010-06-04 12:23                                 ` Dmitry A. Kazakov
2010-06-04 12:59                                   ` Yannick Duchêne (Hibou57)
2010-06-05  4:00                               ` Stephen Leake
2010-06-05  6:13                                 ` tmoran
2010-06-05  8:00                                   ` Dmitry A. Kazakov
2010-06-05  9:05                                     ` Yannick Duchêne (Hibou57)
2010-06-05  9:30                                       ` Dmitry A. Kazakov
2010-06-05  9:45                                         ` Yannick Duchêne (Hibou57)
2010-06-06  6:36                                         ` Jacob Sparre Andersen
2010-06-05 17:59                                     ` tmoran
2010-06-05 19:59                                       ` Dmitry A. Kazakov
2010-06-05 20:41                                         ` tmoran
2010-06-06  7:18                                           ` Dmitry A. Kazakov
2010-06-06 19:27                                             ` tmoran
2010-06-07  7:48                                               ` Dmitry A. Kazakov
2010-06-06  3:46                                         ` Yannick Duchêne (Hibou57)
2010-06-06  7:23                                           ` Dmitry A. Kazakov
2010-06-06 10:22                                         ` Simon Wright
2010-06-06 11:18                                           ` Dmitry A. Kazakov
2010-06-06 13:58                                             ` Simon Wright
2010-06-06 17:22                                               ` Dmitry A. Kazakov
2010-06-05 12:16                                 ` Simon Wright
2010-06-04 19:23                           ` Fritz Wuehler
2010-06-04 21:10                             ` Martin Krischik
2010-06-04 22:02                             ` Dirk Craeynest
2010-06-05  3:33                             ` Duke Normandin
2010-06-05 23:17                               ` Non scrivetemi
2010-06-06  4:45                                 ` Duke Normandin
2010-06-06 16:41                                   ` Fritz Wuehler
2010-06-07  2:15                                     ` Duke Normandin
2010-06-07  6:06                                       ` Non scrivetemi
2010-06-05  7:47                             ` Georg Bauhaus
2010-06-05 22:43                               ` starwars
2010-06-04 21:09                       ` Martin Krischik
2010-05-24 13:20                     ` Duke Normandin
2010-05-25  2:10                       ` Stephen Leake
2010-05-23 18:32             ` (see below)
2010-05-23 19:10               ` Duke Normandin
2010-05-23 19:22                 ` (see below)
2010-05-23 19:40                   ` Duke Normandin
2010-05-24  7:55               ` Martin
2010-05-24 12:05                 ` (see below)
2010-05-24 13:27                   ` Martin
2010-05-24 13:28                 ` Yannick Duchêne (Hibou57)
2010-05-24 13:40                   ` Martin
2010-05-24 15:19                     ` Yannick Duchêne (Hibou57)
2010-05-20 21:29     ` Yannick Duchêne (Hibou57)
2010-05-21  7:58       ` Dmitry A. Kazakov
2010-06-05  8:04   ` Nasser M. Abbasi
2010-06-05  9:24     ` Yannick Duchêne (Hibou57)
2010-06-05 12:27       ` Simon Wright
2010-06-05 12:59       ` Dmitry A. Kazakov
2010-06-05 13:39         ` Yannick Duchêne (Hibou57)
2010-06-05 16:02         ` Nasser M. Abbasi
2010-06-05 18:50           ` Robert A Duff
2010-06-05 20:14             ` (see below)
2010-06-06  7:25               ` Dmitry A. Kazakov
2010-06-06  7:38                 ` Yannick Duchêne (Hibou57)
2010-06-06  7:46                   ` Dmitry A. Kazakov
2010-06-06  8:25                     ` Yannick Duchêne (Hibou57)
2010-06-06  9:22                       ` Dmitry A. Kazakov
2010-06-06 11:06                         ` Yannick Duchêne (Hibou57)
2010-06-06 11:45                           ` Dmitry A. Kazakov [this message]
2010-06-06 12:38                             ` Yannick Duchêne (Hibou57)
2010-06-06 13:10                               ` Dmitry A. Kazakov
2010-06-06 21:22                                 ` Georg Bauhaus
2010-06-07  7:26                                   ` Dmitry A. Kazakov
2010-06-07  7:56                                   ` Martin Krischik
2010-06-07 11:13                                     ` Georg Bauhaus
2010-06-07 12:22                                       ` Dmitry A. Kazakov
2010-06-07 14:12                                         ` Georg Bauhaus
2010-06-07 14:31                                           ` Yannick Duchêne (Hibou57)
2010-06-07 14:51                                           ` Dmitry A. Kazakov
2010-06-07 15:00                                             ` Georg Bauhaus
2010-06-07 15:09                                               ` Dmitry A. Kazakov
2010-06-07 15:28                                                 ` Martin Krischik
2010-06-07 15:50                                                 ` Georg Bauhaus
2010-06-07 16:58                                                   ` Dmitry A. Kazakov
2010-06-07 12:56                                       ` Yannick Duchêne (Hibou57)
2010-06-07 13:27                                         ` Dmitry A. Kazakov
2010-06-07 14:09                                           ` Georg Bauhaus
2010-06-07 14:48                                             ` Yannick Duchêne (Hibou57)
2010-06-07 15:05                                             ` Dmitry A. Kazakov
2010-06-07 15:34                                               ` Martin Krischik
2010-06-07 16:25                                                 ` Georg Bauhaus
2010-06-07 16:30                                                   ` Georg Bauhaus
2010-06-07 17:09                                                   ` Dmitry A. Kazakov
2010-06-08  6:54                                                   ` Martin Krischik
2010-06-07 14:44                                           ` Yannick Duchêne (Hibou57)
2010-06-07 12:58                                 ` Yannick Duchêne (Hibou57)
2010-06-07 13:20                                   ` Dmitry A. Kazakov
2010-06-09  6:31             ` Nasser M. Abbasi
2010-06-09 16:26               ` Robert A Duff
2010-06-05 19:34           ` Dmitry A. Kazakov
2010-06-05 22:56             ` Robert A Duff
2010-06-05 20:15           ` John B. Matthews
2010-06-06  4:08           ` Yannick Duchêne (Hibou57)
2010-06-05 21:16         ` Maciej Sobczak
2010-06-06  7:39           ` Dmitry A. Kazakov
2010-05-20 19:24 ` Anonymous
2010-05-20 19:35   ` Duke Normandin
2010-05-20 19:59     ` Ludovic Brenta
2010-05-21 20:10       ` Warren
2010-05-21 23:05         ` Duke Normandin
2010-05-21 23:44           ` Yannick Duchêne (Hibou57)
2010-05-21 23:55             ` Jeffrey R. Carter
2010-05-22  0:00             ` Duke Normandin
2010-05-25 16:55             ` Warren
2010-05-22 12:23           ` Peter C. Chapin
2010-05-22 13:17             ` Duke Normandin
2010-05-23  0:34           ` Anonymous
2010-05-23  2:23             ` Duke Normandin
2010-05-23  2:42           ` Yannick Duchêne (Hibou57)
2010-05-23 13:22             ` Duke Normandin
2010-05-24 12:14           ` Bryan
2010-05-24 13:22             ` Duke Normandin
2010-05-24 19:56             ` Jeffrey R. Carter
2010-05-25 17:00             ` Warren
2010-05-25  2:11           ` Stephen Leake
2010-05-20 21:37     ` Yannick Duchêne (Hibou57)
2010-05-21 11:00 ` jonathan
2010-05-21 14:21   ` Duke Normandin
2010-05-21 17:29     ` Yannick Duchêne (Hibou57)
2010-05-21 19:52       ` Duke Normandin
2010-05-21 20:11     ` Peter C. Chapin
2010-05-21 20:21       ` Jeffrey R. Carter
2010-05-21 23:07       ` Duke Normandin
2010-05-21 23:13         ` Yannick Duchêne (Hibou57)
2010-05-21 23:53           ` Duke Normandin
2010-05-21 23:24       ` Yannick Duchêne (Hibou57)
2010-05-24 18:01     ` Luis Espinal
2010-05-24 19:34       ` Duke Normandin
2010-05-24 20:04         ` Yannick Duchêne (Hibou57)
2010-05-24 20:25           ` John B. Matthews
2010-05-24 22:21           ` Jeffrey R. Carter
2010-05-24 22:38             ` Yannick Duchêne (Hibou57)
2010-05-25 11:41         ` Anonymous
2010-05-25 12:08           ` Georg Bauhaus
2010-05-25 13:47             ` George Orwell
2010-05-25 14:24               ` Georg Bauhaus
2010-05-25 16:15                 ` J-P. Rosen
2010-05-25 17:34                   ` Dmitry A. Kazakov
2010-05-25 17:42                     ` Ludovic Brenta
2010-05-25 18:16                       ` Yannick Duchêne (Hibou57)
2010-05-25 21:27                         ` Ludovic Brenta
2010-05-25 18:13                     ` Yannick Duchêne (Hibou57)
2010-05-26  7:42                       ` Dmitry A. Kazakov
2010-05-26 21:22                         ` Simon Wright
2010-05-26 21:35                           ` Yannick Duchêne (Hibou57)
2010-05-25 18:16                     ` J-P. Rosen
2010-05-25 18:08                   ` Yannick Duchêne (Hibou57)
2010-05-26  7:24                   ` Stephen Leake
2010-05-26  9:58                     ` Georg Bauhaus
2010-05-26 10:11                       ` Yannick Duchêne (Hibou57)
2010-05-26 10:21                       ` Dmitry A. Kazakov
2010-05-25 16:24                 ` Nomen Nescio
2010-05-25 18:28                   ` Yannick Duchêne (Hibou57)
2010-05-25 19:50                     ` John B. Matthews
2010-05-25 20:20                       ` Yannick Duchêne (Hibou57)
2010-05-25 20:27                       ` Yannick Duchêne (Hibou57)
2010-05-25 18:06                 ` Yannick Duchêne (Hibou57)
2010-05-27 13:20           ` Ada compilers written in ... (was: Re: Ada noob here! Is Ada widely used?) Georg Bauhaus
2010-05-28  2:31             ` Mike Sieweke
2010-05-28  5:01             ` AdaMagica
2010-05-26  7:21         ` Ada noob here! Is Ada widely used? Stephen Leake
2010-05-26  7:59           ` Yannick Duchêne (Hibou57)
2010-05-26  8:06             ` AdaMagica
2010-05-26  8:33               ` Dmitry A. Kazakov
2010-05-26  8:55             ` Ludovic Brenta
2010-05-26  9:24               ` Georg Bauhaus
2010-05-26  9:42                 ` Yannick Duchêne (Hibou57)
2010-05-27  6:49               ` J-P. Rosen
2010-05-27  7:48                 ` Yannick Duchêne (Hibou57)
2010-05-27 16:50                   ` J-P. Rosen
2010-05-27 17:24                     ` Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2010-06-09 10:00 AdaMagica
replies disabled

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