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) |
From: | Eric Bodden <newsserver_mails@bodden.de> |
Newsgroups: | comp.compilers |
Date: | 20 Nov 2004 21:19:05 -0500 |
Organization: | RWTH Aachen University |
References: | 04-11-070 |
Keywords: | Java |
Posted-Date: | 20 Nov 2004 21:19:05 EST |
On 19 Nov 2004 00:53:07 -0500, Lujop wrote:
> Then, my question is. What do you think that's better? What Java
> does, or what I proposed? Can you give my some readings about it? Are
> my terms correct (refering to covariance,contravariance and
> invariance?)
A few months ago I banged my head against this static binding issue
and I really found the Java approach not intuitive at all. I
personally have the opinion that if one had a method
void handle(Object o) {...}
void handle(SpecialObject s) {...}
then the latter should be seen as a specialization of the former. Of
course then one would have other issues however: What about if one
wants to call the first method ("super"-like) from the second one -
does one want to allow this at all? There were more issues, I cannot
remember right now...
Anyway, I would vote for dynamic binding if you asked me.
Eric
--
Eric Bodden, ICQ: 12656220, http://www.bodden.de, PGP: BB465582
Arithmetic Coding Revealed - a comprehensive guide to AC
http://bodden.de/studies/publications/pub_ac_en/
Return to the
comp.compilers page.
Search the
comp.compilers archives again.