comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada OOP alternatives?
Date: Thu, 24 Jul 2008 14:48:02 +0200
Date: 2008-07-24T14:48:02+02:00	[thread overview]
Message-ID: <cdgybr77wil1.jruauobv9o9z.dlg@40tude.net> (raw)
In-Reply-To: 48885757$0$18818$9b4e6d93@newsspool2.arcor-online.net

On Thu, 24 Jul 2008 12:20:07 +0200, Georg Bauhaus wrote:

> Dmitry A. Kazakov wrote:

>>>> then in 80s, but it is no any problem now. IDEs do it better.
>>> Ada IDEs cannot affect semantics?
>> 
>> I am not sure what you mean... GPS does affect the semantics when you
>> change some project options.
> 
> I meant the semantics of child packages and separate units
> as given in the program text.

I lost your point. Can you elaborate it a bit more?

Just to remember, mine was that separate bodies were often used to
structure the source code in order to make it more maintainable and
readable. IDEs and tools are better suited for that. Another use I can
recollect was stubs [in top-down structured programming]. Unfortunately it
never really worked. Today we are using abstract primitive operations
instead.

>>> But suppose your implementation includes one subprogram,
>>>   procedure A(... : T; ...);
>>> that provides for one aspect of the solution made with T.
>>> If that one aspect depends on packages P3 and P4, but A is the
>>> only supbrogram in your package that depends on P3 or P4,
>>> why create another child just for this one aspect?
>> 
>> Which is exactly the problem. "Just one aspect" is an improper way of
>> problem decomposition.
> 
> Why, e.g., build an entire type when a single procedure
> is sufficient, and will be sufficient in the future?

How can you know that?

> It is possible to think of a procedure (or function etc.) as an
> abstract state machine.

Hmm, it is almost impossible.

Procedures describe transitions between states encapsulated by the
parameters and the results of (only the latter in pure functional
languages).

> Many languages have a function type
> built in, functions are objects.

But not in the sense of a stateful object of OO. They are language objects
(a completely unrelated thing, except that in an OOPL a stateful object is
a language object.).

>> 3. The "aspects" available for "separation" are often low level. Your
>> example nicely illustrates this point. It is a pure low-level procedural
>> decomposition.
> 
> OK but this shows very little. Without a procedure (as in "procedural
> decomposition"), a program does nothing. Should every procedure
> be a primitive operation?

Yep, very much so.

> This question is IMO worth asking
> when the task at hand is not "the general theory of problem
> decomposition using ADTs" but "how to write this specific program".

I was always wondering people saying such things. Yes, you can drive the
wrong side of the road so long there is no police officer watching you.

> There is a trade-off:

Really?

> Another ADT child package could become more
> general but introduces complexity. Artificial complexity as,
> I'm sure, some will say.

Well, well, Ada is complex, C is good. Why do you need that artificial
complexity. Everything is void * etc...

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



  parent reply	other threads:[~2008-07-24 12:48 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15 20:38 Ada OOP alternatives? raould
2008-07-16  0:15 ` Robert A Duff
2008-07-16  6:33   ` Georg Bauhaus
2008-07-16  9:54     ` Alex R. Mosteo
2008-07-16 13:03       ` Dmitry A. Kazakov
2008-07-16 14:07       ` Robert A Duff
2008-07-16 18:11         ` (see below)
2008-07-17  0:05           ` Robert A Duff
2008-07-17  0:43             ` (see below)
2008-07-17  1:36               ` Robert A Duff
2008-07-17 11:07                 ` (see below)
2008-07-17 16:45                   ` Robert A Duff
2008-07-17 12:00                 ` Dmitry A. Kazakov
2008-07-17 16:50                   ` Robert A Duff
2008-07-17 18:56                     ` Dmitry A. Kazakov
2008-07-18 12:54                       ` Robert A Duff
2008-07-18 13:36                         ` Dmitry A. Kazakov
2008-07-17 23:27                 ` Randy Brukardt
2008-07-18 12:45                   ` Robert A Duff
2008-07-18 23:22                     ` Randy Brukardt
2008-07-22 20:32                 ` Adam Beneschan
2008-07-22 22:18                   ` Ludovic Brenta
2008-07-23  9:25                     ` Alex R. Mosteo
2008-07-22 23:35                   ` Randy Brukardt
2008-07-23  7:56                   ` Dmitry A. Kazakov
2008-07-23 21:04                     ` Robert A Duff
2008-07-24  7:07                       ` stefan-lucks
     [not found]                       ` <5ob7w7usrc74$.kms2e1vqs4k0.dlg@40tude.net>
     [not found]                         ` <48883529$0$18826$9b4e6d93@newsspool2.arcor-online.net>
     [not found]                           ` <ygdmhl22lzh4$.1dx98hja6p2o6.dlg@40tude.net>
     [not found]                             ` <48883f41$0$18829$9b4e6d93@newsspool2.arcor-online.net>
     [not found]                               ` <6i1s0y8eeka.121ek9qcgunha$.dlg@40tude.net>
     [not found]                                 ` <48885757$0$18818$9b4e6d93@newsspool2.arcor-online.net>
2008-07-24 12:48                                   ` Dmitry A. Kazakov [this message]
2008-07-25  8:47                                     ` Georg Bauhaus
2008-07-25 13:28                                       ` Dmitry A. Kazakov
2008-07-25 16:24                                         ` Georg Bauhaus
2008-07-25 17:55                                           ` Dmitry A. Kazakov
2008-07-26  5:05                   ` Jeff Koftinoff
2008-07-16 14:03     ` Robert A Duff
2008-07-16 14:29       ` 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