Re: Feedback for compiler project

vbdis@aol.com (VBDis)
12 Oct 2001 00:22:30 -0400

          From comp.compilers

Related articles
Feedback for compiler project iddekingej@lycos.com (2001-09-20)
Re: Feedback for compiler project joachim_d@gmx.de (Joachim Durchholz) (2001-10-06)
Re: Feedback for compiler project iddekingej@lycos.com (2001-10-10)
Re: Feedback for compiler project joachim_d@gmx.de (Joachim Durchholz) (2001-10-12)
Re: Feedback for compiler project vbdis@aol.com (2001-10-12)
Re: Feedback for compiler project dmitry@elros.cbb-automation.de (2001-10-13)
Re: Feedback for compiler project iddekingej@lycos.com (2001-10-13)
| List of all articles for this month |
From: vbdis@aol.com (VBDis)
Newsgroups: comp.compilers
Date: 12 Oct 2001 00:22:30 -0400
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
References: 01-10-027
Keywords: design, OOP
Posted-Date: 12 Oct 2001 00:22:30 EDT

iddekingej@lycos.com (J.van Iddekinge) schreibt:


>Dynamic routine and Oop have both the same kind of advantages but the
>first is related to process and the second to objects.


Are you sure that with "dynamic routines" you don't mean something like
interface methods?


I'm not sure whether I understand your point, but perhaps you should
consider:


A method usually is releated to a specific data type (class). When the
same method is implemented for multiple classes (overloaded), the
compiler can find the appropriate routine by examining the object
type. But this approach fails with inheritance, where a method is
specified for a base class, and the same method can be used with
derived classes, too, or can be overridden for derived classes. Then
the compiler needs some conversion (inheritance) rules, how to convert
the type of a given object down to the base type, for which the method
is defined. Or the compiler must create a refererence to a virtual
method, which is resolved at runtime when the object type is perfectly
known.


In your ExecMyQuery example I'm missing any object reference, which
could be used in the related code. How do you expect that (at runtime)
the type of the object is determined (from what???), and the
procedure, applicable to that object, is determined?


DoDi


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.