Re: procedural vs object oriented
- From: Georg Bauhaus <bauhaus@xxxxxxxxxxxxx>
- Date: Thu, 27 Apr 2006 17:51:19 +0200
Pascal Obry wrote:
Maciej Sobczak a écrit :
In what way is this better or more certain than a dispatching call based
on the tag?
Static analysis is possible in this case.
But static analysis should be possible for the following
program, too, as long as for example `cons` returns references
to object of a known finite set of types derived from T...
At least possible in some defined set of cases, if slightly
more difficult.
procedure dis is
package p is
type T is tagged null record;
type REF is access T'class;
procedure op(x: T);
type D1 is new T with null record;
procedure op(x: D1);
type D2 is new T with null record;
procedure op(x: D2);
end P;
use P;
function cons return REF;
y: REF := cons;
begin
op(y.all);
end;
.
- 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: Maciej Sobczak
- Re: procedural vs object oriented
- From: Pascal Obry
- procedural vs object oriented
- Prev by Date: Re: Type safety, C++ and code generation
- Next by Date: Re: Type safety, C++ and code generation
- Previous by thread: Re: procedural vs object oriented
- Next by thread: Re: procedural vs object oriented
- Index(es):