Path: news.daimi.aau.dk!not-for-mail From: Gorel Hedin Newsgroups: comp.lang.eiffel,comp.lang.beta Subject: Re: Java and Eiffel - Further comments: I am depressed. Date: Fri, 18 Apr 1997 09:42:18 +0200 Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 26 Message-ID: <335725DA.9D0@daimi.aau.dk> References: <5hel1s$afv@news-central.tiac.net> <5j2ogd$3lp$1@gjallar.daimi.aau.dk> NNTP-Posting-Host: cruzeiro.daimi.aau.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (X11; I; SunOS 5.5 sun4m) Xref: news.daimi.aau.dk comp.lang.eiffel:28658 comp.lang.beta:11041 Patrick Doyle wrote: > > In article <5j2ogd$3lp$1@gjallar.daimi.aau.dk>, > > > >I agree that Inner classes are a great addition to Java. Inner classes > >are, however, not a new idea to object-oriented languages. > > [explanation of inner classes omitted] > > So that's what inner classes are. Just another name for nested classes? > Even C++ has those. (Not that there's anything wrong with C++, but I would > consider it the least theoretically-based, most pragmatically-based OOL > I know.) No, inner classes in Java are true nested classes as in Simula and BETA where objects of inner classes live in the context of an object of the outer class, and can access instance variables and methods in the outer object. In contrast, the "nested classes" in C++ is only a way of organizing name spaces and does not have any effect on the objects at runtime. True nested classes is a powerful programming feature which is not available in C++. Gorel Hedin gorel@daimi.aau.dk