comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: procedural vs object oriented
Date: Fri, 28 Apr 2006 09:46:22 +0200
Date: 2006-04-28T09:46:22+02:00	[thread overview]
Message-ID: <6hbsa2y01esi.1hom0owrsl51u.dlg@40tude.net> (raw)
In-Reply-To: 3siq2e.3fk.ln@hunter.axlog.fr

On Thu, 27 Apr 2006 16:01:41 +0200, Jean-Pierre Rosen wrote:

> Dmitry A. Kazakov a �crit :

>> Well, no:
>> 
>> 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.
>> 
> Of course, you can assume that every dispatching call is equivalent to a 
> 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



  reply	other threads:[~2006-04-28  7:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-26  8:16 procedural vs object oriented Ananth the Boss
2006-04-26  9:17 ` Jean-Pierre Rosen
2006-04-26 17:44   ` Jeffrey R. Carter
2006-04-26 12:52 ` Dmitry A. Kazakov
2006-04-27  1:33 ` bh
2006-04-27  5:22   ` Ludovic Brenta
2006-04-27  7:36     ` Dmitry A. Kazakov
2006-04-27 10:42       ` Ludovic Brenta
2006-04-27 11:07         ` Maciej Sobczak
2006-04-27 12:03           ` Ludovic Brenta
2006-04-27 17:19           ` Pascal Obry
2006-04-27 15:51             ` Georg Bauhaus
2006-04-27 12:45         ` Dmitry A. Kazakov
2006-04-27 13:20           ` Ludovic Brenta
2006-04-27 14:24             ` Alex R. Mosteo
2006-04-27 15:17               ` Ludovic Brenta
2006-04-27 16:11                 ` Alex R. Mosteo
2006-04-27 20:19                   ` Ludovic Brenta
2006-04-27 14:01           ` Jean-Pierre Rosen
2006-04-28  7:46             ` Dmitry A. Kazakov [this message]
2006-04-27 15:38     ` Peter Amey
2006-04-27 20:20       ` Ludovic Brenta
2006-04-27  6:55 ` Ananth the Boss
replies disabled

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