comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Extending a third party tagged type while adding finalization
Date: Mon, 11 Dec 2017 16:42:00 -0600
Date: 2017-12-11T16:42:00-06:00	[thread overview]
Message-ID: <p0n1jp$sc4$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: p0lhk4$1okm$1@gioia.aioe.org

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
news:p0lhk4$1okm$1@gioia.aioe.org...
> On 2017-12-09 01:17, Randy Brukardt wrote:

I was going to write a longer response, but I think we understand each 
other's positions and we're unlikely to change each other's mind by further 
talk. (And no one else seems to be reading this...) So just a closing 
summary.
...
>> But most mixed operations don't clearly belong to one ADT or another.
>> They're just things that need to be done. (Indeed, the entire top-level 
>> of a
>> program tends to be in this category - it's not going to be reusable 
>> since
>> it is tied to a particular task, it's not going to be commonly used since 
>> it
>> is the high-level operations for a particular task - and as such, 
>> spending
>> much time at all figuring out what abstract entities are involved is 
>> wasted.
>> Just get the job done, spend the effort on the building block parts of 
>> the
>> system that will be reused.)
>
> See, you mow all type abstraction running all the rest basically 
> weakly-/untyped. Why bother with ADTs if you don't let them grow?

Changing ADTs can be very difficult. (That's especially true for full OOP 
designs.) And it is highly unlikely that one will get the initial design 
correct. So in the interest of getting the maximum work done for the minimum 
effort, it's necessary to draw a line at a point where the advantages of 
ADTs are outweighed by their disadvantages. And they have clear 
disadvantages for code that isn't well-understood or experimental or is a 
pure one-off. (That's probably 80% of the code I write.)

> ...
>>>> Based on this definition, almost nothing should be an ADT, because very
>>>> little can be described only by its semantics. Humm, that's actually a
>>>> true
>>>> statement; probably we are feeling different parts of the elephant and
>>>> describing it very differently.
>>>
>>> Probably. Things you cannot associate with the semantics are
>>> implementation aspects. They can be any so long the semantics 
>>> maintained.
>>
>> I suspect you are trying to describe much more of a system by its 
>> semantics
>> than I do. As I previously noted, it just isn't worth the effort to 
>> figure
>> about abstract meanings for things unless they are either very common in 
>> a
>> system or likely candidates for reuse. There's a lot of stuff that has to 
>> be
>> done in programs that defies logical explanation, but that's 
>> irrelevant --
>> one just has to implement something that passes the test, no one cares if 
>> it
>> is elegant. (It took me a long time to come to grips with this truth.) So
>> it's important to realize that one is a lot more productive if one picks
>> their spots where to be elegant (where to use an ADT, in this 
>> discussion).
>
> Yes, this is our core disagreement. I want everything designed in ADTs 
> with a stated purpose.

I don't think that is practical -- certainly not by me. I don't think 
abstractly enough to be able to come up with abstract definitions for a lot 
of things easily. It takes a lot of effort (and time and money), and that 
effort isn't well-spent for things that aren't ever going to be reused, that 
aren't a large part of a program, and often are rather illogical (for 
instance, some of the rules of a real language like Ada). One has to be 
careful to err on the side of over-designing rather than under-designing, 
but trying to abstract everything would double the amount of effort it takes 
(for me, YMMV) to get it built. And re-factoring is always an option if it 
turns out that an ADT would actually have been useful.

                                               Randy.
 



  reply	other threads:[~2017-12-11 22:42 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 12:43 Extending a third party tagged type while adding finalization Jere
2017-11-22 16:42 ` AdaMagica
2017-11-26 17:33   ` Jere
2017-11-26 18:15     ` Dmitry A. Kazakov
2017-11-26 19:31       ` Jere
2017-11-27  9:46     ` AdaMagica
2017-11-27 12:56       ` Jere
2017-11-27 15:00         ` AdaMagica
2017-11-27 16:38           ` Jere
2017-11-27 18:37             ` AdaMagica
2017-11-27 19:53               ` Jere
2017-11-28 11:48                 ` AdaMagica
2017-12-03  2:22                   ` Jere
2017-12-03 21:53               ` Robert Eachus
2017-12-04  7:58                 ` Dmitry A. Kazakov
2017-12-04 14:59                   ` Robert Eachus
2017-12-04 15:39                     ` Dmitry A. Kazakov
2017-11-27 18:10     ` Shark8
2017-11-27 19:56       ` Jere
2017-11-28  1:55       ` Randy Brukardt
2017-12-03  2:47         ` Jere
2017-12-03  9:29           ` Dmitry A. Kazakov
2017-12-03 15:10             ` AdaMagica
2017-12-03 16:39               ` Dmitry A. Kazakov
2017-12-03 19:34             ` AdaMagica
2017-12-03 19:41               ` Dmitry A. Kazakov
2017-12-04 12:38                 ` AdaMagica
2017-12-04 13:19                   ` AdaMagica
2017-12-04 13:55                     ` Dmitry A. Kazakov
2017-12-04 15:44                       ` AdaMagica
2017-12-04 16:19                         ` Dmitry A. Kazakov
2017-12-04 20:54           ` Randy Brukardt
2017-12-04 21:02             ` Dmitry A. Kazakov
2017-12-05 21:09               ` Randy Brukardt
2017-12-05 21:29                 ` Dmitry A. Kazakov
2017-12-07  1:13                   ` Randy Brukardt
2017-12-07  8:36                     ` Dmitry A. Kazakov
2017-12-07 23:22                       ` Randy Brukardt
2017-12-08  9:30                         ` Dmitry A. Kazakov
2017-12-09  0:17                           ` Randy Brukardt
2017-12-11  9:03                             ` Dmitry A. Kazakov
2017-12-11 22:42                               ` Randy Brukardt [this message]
2017-12-12 16:11                                 ` AdaMagica
2017-12-12 20:08                               ` G. B.
2017-12-12 20:32                                 ` Dmitry A. Kazakov
replies disabled

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