Path: news.daimi.aau.dk!news-feed.inet.tele.dk!europa.clark.net!4.1.16.34!cpk-news-hub1.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!prodigy.com!nntp.earthlink.net!usenet From: Jay Martin Newsgroups: comp.lang.java.advocacy,comp.lang.beta Subject: Re: inner classes are hideous Date: Sat, 09 Aug 1997 12:53:47 -0700 Organization: EarthLink Network, Inc. Lines: 57 Message-ID: <33ECCACB.73@earthlink.net> References: <01bc958d$10ec9a00$3fe82299@mayura> <33EA55A0.DEE@earthlink.net> <33EA63AB.2DDB@earthlink.net> <33EC29CA.7CD5@earthlink.net> <5shqsc$fq$1@gjallar.daimi.aau.dk> NNTP-Posting-Host: pool040-max3.gardena-ca-us.dialup.earthlink.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.03 (WinNT; I) Xref: news.daimi.aau.dk comp.lang.java.advocacy:13043 comp.lang.beta:11231 Ole Lehrmann Madsen wrote: > > Jay Martin writes: > >Anatoly Vorobey wrote: > >> > >> On Thu, 07 Aug 1997 17:09:15 -0700, Jay Martin wrote > >> What do inner classes (as hideous as they are) have in common with > >> theoretical functional languages, O Clueless One? Or are you simply > >> enjoying flaming everything you don't understand? > > >Inner classes are like "closures" like from Scheme. The ability > >to nest and for the nested entities to automatically get access > >to all objects in the enclosing scopes. Something that has > >not been in the mainstream strongly typed object oriented model > >with respect to classes until this "genius" discovery of > >inner classes. Basically, Inner classes seems to be the > >result of a "language designer" with a "Scheme" mentality > >axe to grind at any cost. > > Inner Classes (or nested classes) originate from Simula, the first > object-oriented language. They have been further developed in the BETA > programming language. I am not familiar with the details of inner > classes in Java, but in Simula and BETA nested classes are considered > a very useful feature and used for a large variety of reasons. The question is its "usefulness" reason enough to bloat a "simple" language. > > Nested classes in Simula is a generalization of nested procedures and > blocks from Algol 60 (sometimes called block structure). To my > knowledge, the Algol concept of block structure (including lexical > scoping) has influenced the design of Scheme. I thus think that Inner > Classes in Java can be just as well traced back to an > Algol/Simula/BETA OO-style as to a Scheme style. Algol style nesting for structuring of programs has been discredited for years. The problems with Algol nesting is the reason behind the invention of abstract data types and later the OO paradigm. Read any textbook on programming languages. That Simula had Algol style nesting is not surprising as this was the paradigm of the time. When modules, abstract types, OO came along Algol nesting was pretty much declared "redundant" and "for the birds". So basically Algol nesting had died as a structuring technique in the language evolution lines of C, C++, Ada, Eiffel, ModulaX and Java 1.0, etc. Scheme/Lisp/other functional langauges picked up "nesting" in the 70's and extended it and this is why I think that modern descendents of "nesting" are these languages. Since, the supposive designer of "Inner Classes" had done previous work in Scheme/Lisp seems s strong indication that this experience influenced its design. Now playing around with "nesting" concepts is fine in academic or leading edge reseach languages, I balk at 11th hour poorly designed inserts of it into a mainstream supposively "simple" language like Java. IMHO "nesting" in OO languages is pretty much just dangerous bloat.