Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Nigel Wade Newsgroups: comp.lang.java.programmer Subject: Re: CLI Java Glitch Date: Thu, 23 Jun 2011 15:23:26 +0100 Lines: 34 Message-ID: <96h0ivFhakU1@mid.individual.net> References: <4dffe2ea$0$57121$c30e37c6@exi-reader.telstra.net> <96dvubFalpU1@mid.individual.net> <3qOdnSBTduuqsp_TnZ2dnUVZ_rOdnZ2d@earthlink.com> <7sd407hclqd092brj1cgqmlk4r129bcqb4@4ax.com> <3qh407te4dp4l40kqrlgt6vsi636rs8qqd@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net 2JXuSBkxXuk24gCdWkrEbQHk+uUOmoa1o1Kjhb9WSsKTwEU7G0 Cancel-Lock: sha1:CSCAw5XwalChmML8mCs10HmzK14= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 In-Reply-To: <3qh407te4dp4l40kqrlgt6vsi636rs8qqd@4ax.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5576 On 22/06/11 20:50, Gene Wirchenko wrote: > On 22 Jun 2011 19:45:02 GMT, ram@zedat.fu-berlin.de (Stefan Ram) > wrote: > > [snip] > >> Programmers usually are grateful to get error reports as >> soon as possible. > > We are even more grateful not to have something flagged as an > error when it is not, or when it need not be. But in your original post it is an error. Java is case-sensitive and the class you asked for does not exist. Therefore it has to be flagged as an error. If Java were to start guessing what you might have intended anarchy would result. What if you wanted to run your class called deletefiles (which prompts you before deleting any files), but Java wasn't able to find that because you'd got your classpath wrong, or for some other reason. But it did find a class called DeleteFiles (a similar class, but it deletes everything without asking) so ran that for you instead. What if the class it found had different constructors, or methods, and your code crashed in strange and wonderful ways? Would you still think that randomly substituting a class for something which was superficially similar in name was a good idea? Sloppy user thinking should not be encouraged. Whilst it may make the user's life a little easier in some cases, that small benefit is grossly outweighed when it blows up in their face -- Nigel Wade