Re: Java static binding for parameters and covariance/contravariance

vbdis@aol.com (VBDis)
26 Nov 2004 22:45:25 -0500

          From comp.compilers

Related articles
Java static binding for parameters and covariance/contravariance lujoplujop@gmail.com (Lujop) (2004-11-19)
Re: Java static binding for parameters and covariance/contravariance newsserver_mails@bodden.de (Eric Bodden) (2004-11-20)
Re: Java static binding for parameters and covariance/contravariance vbdis@aol.com (2004-11-20)
Re: Java static binding for parameters and covariance/contravariance mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2004-11-20)
Re: Java static binding for parameters and covariance/contravariance lujoplujop@gmail.com (Lujop) (2004-11-26)
Re: Java static binding for parameters and covariance/contravariance vbdis@aol.com (2004-11-26)
Re: Java static binding for parameters and covariance/contravariance boldyrev+nospam@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2004-11-28)
| List of all articles for this month |
From: vbdis@aol.com (VBDis)
Newsgroups: comp.compilers
Date: 26 Nov 2004 22:45:25 -0500
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
References: 04-11-077
Keywords: Java
Posted-Date: 26 Nov 2004 22:45:25 EST

  vbdis@aol.com (VBDis) schreibt:


Ooops, somebody seems to have reformatted my message.
[ Oops, that was me. Sorry I smashed your table. -John]


>In Delphi (OPL) conflicting methods must be attributed explicitly as:
>virtual - can be redefined in derived classes override - virtual
>replacement for the ancestor class method of the same signature
>overload - method with intentionally different signature reintroduce -
>supersedes (hides) ancestor methods of the same name


This table should read like this:


virtual - can be redefined in derived classes.


override - virtual replacement for the ancestor class method of the same
signature.


overload - method with intentionally different signature.


reintroduce - supersedes (hides) ancestor methods of the same name.




I also may have missed your point. When the selection of an overloaded
method has to depend on the actual argument types, then the compiler
only has the chance to defer the arbitration until runtime. Then one
should be prepared for runtime error messages indicating that no
overloaded method could be found for the actual combination of
argument types. I'm not sure whether such hidden automatism really is
desireable, or should be circumvented by a more static redesign of the
program.


DoDi


Post a followup to this message

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