X-Received: by 10.66.74.135 with SMTP id t7mr7844237pav.29.1357507325477; Sun, 06 Jan 2013 13:22:05 -0800 (PST) Received: by 10.49.71.169 with SMTP id w9mr9958351qeu.7.1357507325406; Sun, 06 Jan 2013 13:22:05 -0800 (PST) Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.ripco.com!rahul.net!wasp.rahul.net!rahul.net!news.kjsl.com!usenet.stanford.edu!b8no2210455pbd.0!news-out.google.com!s9ni85391pbb.0!nntp.google.com!f6no9345208pbd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Sun, 6 Jan 2013 13:22:05 -0800 (PST) In-Reply-To: <50e9e5b3$0$292$14726298@news.sunsite.dk> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.14.119.173; posting-account=lPVJQwoAAACjT2AlnY0YSj2LC4j2qtwQ NNTP-Posting-Host: 50.14.119.173 References: <50e9e5b3$0$292$14726298@news.sunsite.dk> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: "Hello world!" without a public class? From: "Aryeh M. Friedman" Injection-Date: Sun, 06 Jan 2013 21:22:05 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.lang.java.programmer:21076 On Sunday, January 6, 2013 3:59:30 PM UTC-5, Arne Vajh=F8j wrote: > On 1/6/2013 12:51 PM, Aryeh M. Friedman wrote: >=20 > > On Sunday, January 6, 2013 12:43:53 PM UTC-5, Lew wrote: >=20 > >> Aryeh M. Friedman wrote: >=20 > >>> This the most common they are going to run into in real life and >=20 > >>> when you get in inheritance explain the difference between the 4 >=20 > >>> options. You should also point out (I know I will get flamed >=20 > >>> for this ;-)) that the only time you do not want to use "public" >=20 > >>> is in inner classes (which in my opinion should be outlawed >=20 > >>> anyways) >=20 > >> >=20 > >> Do you really mean just inner classes? Would you ban all nested >=20 > >> classes >=20 > >> outright? >=20 > >> >=20 > >> It would be a very, very boneheaded thing to outlaw inner classes. >=20 > >> >=20 > >> You'd destroy a common idiom for declaring listeners. You'd make >=20 > >> lambdas >=20 > >> >=20 > >> impossible. You'd kill one of the most expressive features of Java, >=20 > >> that >=20 > >> >=20 > >> was introduced to the language in the first place because of its >=20 > >> great >=20 > >> power. >=20 > > >=20 > > And get rid of one the most unreadable/widely abused parts of all >=20 > > Java code? Sounds good to me... almost everything done with >=20 > > inner/nested classes can be done cleaner with post 1.5 constructs >=20 > > that do not require impossible to read code. >=20 >=20 >=20 > What post 1.5 constructs can replace inner classes? >=20 >=20 >=20 > Arne See previous message