comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: What would you like in Ada202X?
Date: Fri, 27 Apr 2012 19:17:28 -0700 (PDT)
Date: 2012-04-27T19:17:28-07:00	[thread overview]
Message-ID: <32386740.398.1335579448929.JavaMail.geo-discussion-forums@ynjw9> (raw)
In-Reply-To: <25142265.182.1335570050700.JavaMail.geo-discussion-forums@vbez18>

On Friday, April 27, 2012 4:40:50 PM UTC-7, sbelm...@gmail.com wrote:
> On Friday, April 27, 2012 7:18:34 PM UTC-4, Randy Brukardt wrote:
> 
> > Note that Ada 95 did that (implicitly) for the Initialize/Adjust/Finalize 
> > routines of type Controlled. We made that more explicit in Ada 2005, but 
> > that did not reflect any language change. This is another example of a 
> > "hook".
> 
> But this, along with the other hooks, seems like a relic of a single-inheritance version of Ada.  A much (well, perhaps just slightly) better version would be to split things up into multiple interfaces.  For instance, instead of just extending Ada.Finalization and getting all three hooks regardless, you split the three routines into three different one-subprogram interfaces.  Types extend exactly which ones they want, and not the ones they don't.  If you don't want Finalization or Initialization, then you only extend the Ada.Finalization.Adjustable (e.g.), and you no longer have usless subprograms being called to perform usless actions, and any mistakes (forgetting to implement one, trying to implement another, etc) are caught at compile time.  Types get exactly what they ask for, and nothing they don't.  Why leave to a human what can be done by the compiler?

How is this possibly going to work with class-wide types?  Sure, it's not common to call Initialize/Adjust/Finalize directly in a program, but consider some other abstract type T that has procedure methods A, B, and C.  For one type T1 derived from T, it makes sense that A and B would be no-ops.  For another type T2 derived from T, A and B would do something.  Maybe for another derived type T3, A would do something but C would be a no-op.  Now you want to write a procedure that takes an argument Obj of type T'Class (or access-to-T'Class), and that procedure wants to call method A and/or B and/or C (and is perfectly fine with one or more of those procedures being no-ops).  How can it do this, if you say A, B, and C can't be defined as primitives of type T but have to be defined in some other interface or something like that?  Whatever solution you're going to come up with, it's not worth it.  It would require a lot of rigmarole to implement a rather common situation, and requiring all that extra junk seems likely to make things more error-prone than the problem you're trying to solve.  

                       -- Adam



  reply	other threads:[~2012-04-28  2:17 UTC|newest]

Thread overview: 312+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-25  7:47 What would you like in Ada202X? Martin
2012-04-25  8:01 ` Yannick Duchêne (Hibou57)
2012-04-25  8:30   ` stefan-lucks
2012-04-25 19:21   ` Adam Beneschan
2012-04-28 11:50   ` Yannick Duchêne (Hibou57)
2012-04-28 13:21   ` Yannick Duchêne (Hibou57)
2012-04-29  1:03     ` BrianG
2012-04-25  8:36 ` Jacob Sparre Andersen
2012-04-25  8:46   ` Yannick Duchêne (Hibou57)
2012-04-25  9:04     ` leonid
2012-04-25 11:30     ` Jacob Sparre Andersen
2012-04-26  2:00       ` Randy Brukardt
2012-04-26 13:10         ` AdaMagica
2012-04-26 15:49       ` anon
2012-04-27  0:26         ` Randy Brukardt
2012-04-25  9:10   ` Martin
2012-04-25  8:36 ` Dmitry A. Kazakov
2012-04-25  8:59   ` Yannick Duchêne (Hibou57)
2012-04-25  9:24     ` Dmitry A. Kazakov
2012-04-25 10:05       ` Yannick Duchêne (Hibou57)
2012-04-26  2:08       ` Randy Brukardt
2012-04-26  8:50         ` Dmitry A. Kazakov
2012-04-26 23:50           ` Randy Brukardt
2012-04-27  5:03             ` Yannick Duchêne (Hibou57)
2012-04-27 13:50               ` Robert A Duff
2012-04-27 23:25               ` Randy Brukardt
2012-04-28  6:32                 ` Yannick Duchêne (Hibou57)
2012-04-27  7:56             ` Dmitry A. Kazakov
2012-04-27 13:56               ` Robert A Duff
2012-04-28  8:32                 ` Dmitry A. Kazakov
2012-04-28 11:44                   ` Yannick Duchêne (Hibou57)
2012-04-29 13:35                   ` Robert A Duff
2012-04-29 15:59                     ` Dmitry A. Kazakov
2012-04-29 19:27                       ` Robert A Duff
2012-04-29 20:09                         ` Dmitry A. Kazakov
2012-05-01  2:17                     ` Randy Brukardt
2012-04-25  9:31   ` Dmitry A. Kazakov
2012-04-26  2:10     ` Randy Brukardt
2012-05-10  7:29   ` Gustaf Thorslund
2012-05-14  9:25     ` stefan-lucks
2012-05-14 12:19       ` Dmitry A. Kazakov
2012-05-14 13:09         ` Georg Bauhaus
2012-05-14 13:40           ` Dmitry A. Kazakov
2012-05-14 15:50             ` Georg Bauhaus
2012-05-14 20:24               ` Gustaf Thorslund
2012-05-14 22:49                 ` tmoran
2012-05-15  6:15                   ` Gustaf Thorslund
2012-04-25  9:09 ` Georg Bauhaus
2012-04-25  9:14   ` Yannick Duchêne (Hibou57)
2012-04-25  9:30   ` Dmitry A. Kazakov
2012-04-25 13:11   ` Marc C
2012-04-25 13:35     ` Georg Bauhaus
2012-04-25 13:36     ` Pascal Obry
2012-04-25 14:18     ` Yannick Duchêne (Hibou57)
2012-04-25 16:12     ` björn lundin
2012-04-25 17:36       ` Lucretia
2012-04-25 20:26         ` Yannick Duchêne (Hibou57)
2012-04-26 15:20       ` Simon Wright
2012-04-28 10:58         ` björn lundin
2012-04-26 12:37     ` Marc C
2012-04-25 18:14   ` Jeffrey Carter
2012-04-25 18:51     ` Dmitry A. Kazakov
2012-04-25 20:53     ` Yannick Duchêne (Hibou57)
2012-04-25 21:14       ` Jeffrey Carter
2012-04-25 21:27         ` Yannick Duchêne (Hibou57)
2012-04-25 21:30         ` Yannick Duchêne (Hibou57)
2012-04-25 22:33           ` Jeffrey Carter
2012-04-26  0:50             ` Yannick Duchêne (Hibou57)
2012-04-26  1:06               ` Jeffrey Carter
2012-04-28 11:02               ` okellogg
2012-04-28 11:48                 ` Yannick Duchêne (Hibou57)
2012-04-29 13:43                 ` Robert A Duff
2012-04-29 16:59                   ` okellogg
2012-04-29 19:04                     ` Robert A Duff
2012-04-29 19:32                       ` Yannick Duchêne (Hibou57)
2012-04-29 19:37                       ` Yannick Duchêne (Hibou57)
2012-04-29 19:55                         ` Robert A Duff
2012-04-29 21:37                       ` okellogg
2012-04-29 22:51                         ` Robert A Duff
2012-04-26  2:23   ` Randy Brukardt
2012-04-26  8:25     ` Dmitry A. Kazakov
2012-04-26 23:58       ` Randy Brukardt
2012-04-27  7:23         ` Dmitry A. Kazakov
2012-04-27 22:42           ` Randy Brukardt
2012-04-28  7:53             ` Dmitry A. Kazakov
2012-04-28 11:40               ` Yannick Duchêne (Hibou57)
2012-04-28 11:51                 ` Dmitry A. Kazakov
2012-05-01  2:32               ` Randy Brukardt
2012-04-27  7:41   ` Jacob Sparre Andersen
2012-04-27 15:33     ` Adam Beneschan
2012-04-29  7:57     ` J-P. Rosen
2012-04-29 17:32       ` Robert Love
2012-04-29 23:33       ` Shark8
2012-05-10  7:18   ` ytomino
2012-05-10 15:25     ` Adam Beneschan
2012-05-10 15:51       ` ytomino
2012-05-10 17:09         ` Adam Beneschan
2012-05-10 18:25           ` ytomino
2012-04-25 12:13 ` Georg Bauhaus
2012-04-25 16:41   ` tmoran
2012-04-25 13:10 ` Nicholas Paul Collin Gloucester
2012-04-25 18:10   ` Zhu Qun-Ying
2012-04-25 18:07 ` okellogg
2012-04-25 19:15   ` Adam Beneschan
2012-04-25 20:12     ` okellogg
2012-04-25 20:26       ` Jeffrey Carter
2012-04-25 21:09         ` Yannick Duchêne (Hibou57)
2012-04-25 21:11         ` Martin Dowie
2012-04-25 22:18           ` Georg Bauhaus
2012-04-26  2:36             ` Randy Brukardt
2012-04-25 20:40       ` Adam Beneschan
2012-04-25 22:05         ` okellogg
2012-04-25 23:13           ` Adam Beneschan
2012-04-26  1:46             ` Brad Moore
2012-04-26  2:41             ` Randy Brukardt
2012-04-26  7:43         ` Mart van de Wege
2012-04-26  8:46           ` Georg Bauhaus
2012-04-26 14:57             ` Mart van de Wege
2012-04-26 15:28           ` Adam Beneschan
2012-04-26 18:16           ` Jeffrey Carter
2012-04-26 21:41             ` Mart van de Wege
2012-04-26 22:01               ` Jeffrey Carter
2012-04-25 20:19     ` Jeffrey Carter
2012-04-25 21:05   ` Yannick Duchêne (Hibou57)
2012-04-26  2:33   ` Randy Brukardt
2012-04-25 18:24 ` Jeffrey Carter
2012-04-25 19:02   ` Dmitry A. Kazakov
2012-04-25 19:02 ` Oliver Kleinke
2012-04-25 19:27   ` Dmitry A. Kazakov
2012-04-25 20:50   ` Georg Bauhaus
2012-04-26  8:15     ` Oliver Kleinke
2012-04-26  9:16       ` Jacob Sparre Andersen
2012-04-26  9:16       ` Georg Bauhaus
2012-04-25 21:17   ` Yannick Duchêne (Hibou57)
2012-04-26  8:18     ` Oliver Kleinke
2012-04-25 22:14 ` ytomino
2012-04-26  0:37   ` Yannick Duchêne (Hibou57)
2012-04-26  2:52     ` Randy Brukardt
2012-04-26 15:19       ` Adam Beneschan
2012-04-26 15:55         ` Dmitry A. Kazakov
2012-04-27  2:38         ` ytomino
2012-04-27  8:09           ` Georg Bauhaus
2012-04-27  8:19             ` Dmitry A. Kazakov
2012-04-27  9:46               ` Georg Bauhaus
2012-04-27 10:05                 ` Dmitry A. Kazakov
2012-04-27 11:04                   ` Georg Bauhaus
2012-04-27 12:10                     ` Dmitry A. Kazakov
2012-04-26  4:12     ` ytomino
2012-04-26  8:44     ` Dmitry A. Kazakov
2012-04-26 11:22       ` Yannick Duchêne (Hibou57)
2012-04-26 13:17         ` Dmitry A. Kazakov
2012-04-27  0:09       ` Randy Brukardt
2012-04-27  5:23         ` Yannick Duchêne (Hibou57)
2012-04-27 22:49           ` Randy Brukardt
2012-04-27  7:31         ` Dmitry A. Kazakov
2012-04-27 22:46           ` Randy Brukardt
2012-04-28  8:41             ` Dmitry A. Kazakov
2012-04-25 22:30 ` Shark8
2012-04-26  0:42   ` Yannick Duchêne (Hibou57)
2012-04-26  9:29 ` gautier_niouzes
2012-04-26 11:27   ` Yannick Duchêne (Hibou57)
2012-04-26 13:19     ` Dmitry A. Kazakov
2012-04-30 22:38     ` gautier_niouzes
2012-04-27  0:18 ` sbelmont700
2012-04-27 16:04   ` Shark8
2012-04-27 21:11     ` sbelmont700
2012-04-27 23:18       ` Randy Brukardt
2012-04-27 23:40         ` sbelmont700
2012-04-28  2:17           ` Adam Beneschan [this message]
2012-04-28  8:03           ` Dmitry A. Kazakov
2012-04-29  3:20       ` Shark8
2012-04-29 15:42         ` sbelmont700
2012-04-29 23:29           ` Shark8
2012-04-30  2:00             ` sbelmont700
2012-04-27 23:03   ` Randy Brukardt
2012-04-27  5:10 ` Nasser M. Abbasi
2012-04-27  5:36   ` Yannick Duchêne (Hibou57)
2012-04-27 10:59 ` Martin
2012-04-27 17:05   ` Simon Wright
2012-04-30  7:28     ` Martin
2012-05-01  2:45       ` Randy Brukardt
2012-05-01  7:28         ` Martin
2012-05-01 17:15           ` Shark8
2012-05-01 18:13             ` Jeffrey Carter
2012-05-01 19:30             ` Dmitry A. Kazakov
2012-05-01 20:23             ` Robert A Duff
2012-05-01 21:53               ` tmoran
2012-05-01 22:05                 ` Adam Beneschan
     [not found]                   ` <JYOdnei1xPFt8D3SnZ2dnUVZ_qudnZ2d@earthlink.com>
2012-05-02  4:28                     ` Shark8
2012-05-02  8:18             ` Martin
2012-05-02 12:57               ` Shark8
2012-05-08 17:45             ` Martin Dowie
2012-05-03 15:30           ` gautier_niouzes
2012-05-03 15:58             ` Yannick Duchêne (Hibou57)
2012-05-04  7:25               ` Martin
2012-05-01 16:23         ` Simon Wright
2012-04-29  3:52   ` Shark8
2012-04-29  7:13     ` Dmitry A. Kazakov
2012-04-29  9:17       ` gautier_niouzes
2012-04-27 15:33 ` mjsilva
2012-04-28  1:38   ` BrianG
2012-05-01 15:04     ` mjsilva
2012-04-30  6:28 ` Michael Rohan
2012-04-30  6:40 ` Michael Rohan
2012-04-30  8:27   ` Yannick Duchêne (Hibou57)
2012-05-06 18:48 ` Niklas Holsti
2012-05-06 19:27   ` Simon Wright
2012-05-06 20:47     ` Niklas Holsti
2012-05-06 19:28   ` Dmitry A. Kazakov
2012-05-06 20:06     ` Yannick Duchêne (Hibou57)
2012-05-06 21:26     ` Niklas Holsti
2012-05-07  7:49       ` Dmitry A. Kazakov
2012-05-07 23:18         ` Niklas Holsti
2012-05-08  9:03           ` Dmitry A. Kazakov
2012-05-08 19:20             ` Niklas Holsti
2012-05-08 19:44               ` Niklas Holsti
2012-05-09  8:02               ` Dmitry A. Kazakov
2012-05-10  0:47                 ` Randy Brukardt
2012-05-13 19:53                   ` Niklas Holsti
2012-05-15  6:30                     ` Randy Brukardt
2012-05-15  7:58                       ` Dmitry A. Kazakov
2012-05-16  0:05                         ` Randy Brukardt
2012-05-17 19:48                       ` Niklas Holsti
2012-05-18  4:28                         ` Randy Brukardt
2012-05-17 14:40                 ` Niklas Holsti
2012-05-17 17:12                   ` Dmitry A. Kazakov
2012-05-07  6:33   ` ytomino
2012-05-07 22:34     ` Niklas Holsti
2012-05-08  0:48       ` Randy Brukardt
2012-05-08  6:30         ` Niklas Holsti
2012-05-08 22:11           ` Randy Brukardt
2012-05-08 22:22           ` Randy Brukardt
2012-05-09  7:18             ` Dmitry A. Kazakov
2012-05-10  0:30               ` Randy Brukardt
2012-05-10  7:44                 ` Dmitry A. Kazakov
2012-05-10 21:22             ` Niklas Holsti
2012-05-11  7:39               ` Dmitry A. Kazakov
2012-05-12  0:11               ` Randy Brukardt
2012-05-15 21:35                 ` Niklas Holsti
2012-05-16  0:19                   ` Randy Brukardt
2012-05-17 22:01                     ` Niklas Holsti
2012-05-18  4:35                       ` Randy Brukardt
2012-05-16  7:39                   ` Dmitry A. Kazakov
2012-05-10  6:45       ` ytomino
2012-05-15 21:52         ` Niklas Holsti
2012-07-03 15:41   ` Pascal Obry
2012-07-03 15:50     ` Pascal Obry
2012-07-04 11:41       ` Ada novice
2012-07-04 12:30         ` Nasser M. Abbasi
2012-07-04 17:05           ` shai.lesh
2012-07-04 17:55           ` Simon Wright
2012-07-04 18:35             ` Nasser M. Abbasi
     [not found]             ` <0o59v7djiffnl7sqdpp2uiso78oa9hb8sb@invalid.netcom.com>
2012-07-04 20:34               ` shai.lesh
2012-07-04 22:26                 ` Simon Wright
     [not found]                   ` <j5p9v7l646mlk9m073u4m69dg3gjfjblfm@invalid.netcom.com>
2012-07-05  7:53                     ` shai.lesh
2012-07-05  8:18                       ` Simon Wright
2012-07-06  0:48                         ` John B. Matthews
2012-07-05  8:30                       ` georg bauhaus
2012-07-05 11:57                         ` shai.lesh
2012-07-05 12:11                           ` Nasser M. Abbasi
2012-07-05 12:21                             ` Nasser M. Abbasi
2012-07-05 13:07                               ` shai.lesh
2012-07-05 14:08                                 ` Nasser M. Abbasi
2012-07-05 15:51                                   ` Ada novice
2012-07-05 15:55                   ` johnscpg
2012-07-05 16:57                     ` Simon Wright
2012-07-05 17:36                       ` shai.lesh
2012-07-06 12:07                       ` Ada novice
2012-07-06 15:29                         ` Simon Wright
2012-07-12  6:02                           ` Egil Høvik
2012-07-12  8:29                             ` Simon Wright
2012-07-12  9:00                               ` Egil Høvik
2012-07-12 12:44                                 ` Georg Bauhaus
2012-07-12 13:20                                   ` Egil Høvik
2012-07-12 15:53                                   ` Adam Beneschan
2012-07-12 16:34                                     ` Dmitry A. Kazakov
2012-07-12 17:35                                     ` Georg Bauhaus
2012-07-19  6:44                                     ` David Thompson
2012-07-19 18:22                                       ` Simon Wright
2012-07-20  6:20                                         ` Georg Bauhaus
2012-07-27 19:49                                           ` Ada novice
2012-07-12  9:47                               ` Nasser M. Abbasi
2012-05-10 13:13 ` Martin
2012-05-18  9:56 ` Marius Amado-Alves
2012-06-04  8:10 ` Yannick Duchêne (Hibou57)
2012-06-11 21:54 ` Yannick Duchêne (Hibou57)
2012-06-29 11:29 ` joachim.schroeer
2012-06-29 11:54   ` AdaMagica
2012-06-29 12:42     ` stefan-lucks
2012-06-29 15:12     ` Adam Beneschan
2012-07-03  0:47     ` Randy Brukardt
2012-06-29 12:13   ` Dmitry A. Kazakov
2012-06-29 22:37     ` Robert A Duff
2012-06-30 12:00 ` Brian Drummond
2012-06-30 12:34   ` Dmitry A. Kazakov
2012-06-30 17:00     ` Brian Drummond
2012-06-30 18:43       ` Dmitry A. Kazakov
2012-06-30 21:06         ` Brian Drummond
2012-07-01  8:17           ` Oliver Kellogg
2012-07-01  8:28             ` Pascal Obry
2012-07-01  8:25           ` Dmitry A. Kazakov
2012-07-01 10:57             ` Brian Drummond
2012-07-01 12:46               ` Dmitry A. Kazakov
2012-07-03  0:53               ` Randy Brukardt
2012-06-30 15:51   ` Robert A Duff
2012-06-30 17:37     ` Brian Drummond
2012-06-30 18:09       ` Robert A Duff
2012-06-30 18:26       ` Niklas Holsti
2012-07-01 10:47         ` Brian Drummond
2012-07-13  8:07 ` Martin
2012-07-13 11:04   ` Pascal Obry
2012-07-13 11:13     ` Martin
replies disabled

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