Re: procedural vs object oriented
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: Fri, 28 Apr 2006 09:46:22 +0200
On Thu, 27 Apr 2006 16:01:41 +0200, Jean-Pierre Rosen wrote:
Dmitry A. Kazakov a écrit :
Well, no:Of course, you can assume that every dispatching call is equivalent to a
if Read (File) then
Foo;
else
Bar;
end if;
The uncertainty of a dispatching call is one of the context, exactly as in
the example above. Provided, that there is nothing uncertain in how
dispatching works or what potential targets do.
case statement over all possibly redefined primitives. That works well
for one level.
But if you consider that each called primitive may in turn redispatch
internally, you end up with a combinatorial explosion.
Ah, but redispatch is luckily not allowed in Ada. The programmer has to
explicitly convert the type to the class. That should not slip through peer
review.
[ I would even disallow it altogether. There is your trick for such
things.]
In theory, yes, the analysis can be performed. In practice, no.
Yes, but it is a sort of "postmortem" or C-ish approach. There is nothing
fundamentally evil in dispatching if LSP problematic is supported. It is a
question of the language and tools. Something like SPARK could change it.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.
- References:
- procedural vs object oriented
- From: Ananth the Boss
- Re: procedural vs object oriented
- From: bh
- Re: procedural vs object oriented
- From: Ludovic Brenta
- Re: procedural vs object oriented
- From: Dmitry A. Kazakov
- Re: procedural vs object oriented
- From: Ludovic Brenta
- Re: procedural vs object oriented
- From: Dmitry A. Kazakov
- Re: procedural vs object oriented
- From: Jean-Pierre Rosen
- procedural vs object oriented
- Prev by Date: Re: where exactly c++,c fail and Ada gets thru'
- Next by Date: Re: where exactly c++,c fail and Ada gets thru'
- Previous by thread: Re: procedural vs object oriented
- Next by thread: Re: procedural vs object oriented
- Index(es):
Relevant Pages
|