Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #5577
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: CLI Java Glitch |
| Date | 2011-06-23 08:58 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <2do60713no4mvf4t8elsppdt5qcpmidlcj@4ax.com> (permalink) |
| References | (5 earlier) <3qOdnSBTduuqsp_TnZ2dnUVZ_rOdnZ2d@earthlink.com> <7sd407hclqd092brj1cgqmlk4r129bcqb4@4ax.com> <users-20110622212145@ram.dialup.fu-berlin.de> <3qh407te4dp4l40kqrlgt6vsi636rs8qqd@4ax.com> <96h0ivFhakU1@mid.individual.net> |
On Thu, 23 Jun 2011 15:23:26 +0100, Nigel Wade <nmw-news@ion.le.ac.uk>
wrote:
>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
I have already posted a solution. It is not anarchy. On a
case-insensitive filesystem:
search for filename
How many?
0: throw not found
1: run it regardless of case
2+: Is one of them a case match?
Yes: run that one
No: throw ambiguous name
>(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
See above. That would be ambiguous. I had not thought of the
path, but would not mind seeing a slightly longer startup by running
through all of the directories. Run the first exact case match if
there is one. If not, run the first match in a directory. If there
is more than one case-insensitive match in a directory, throw an
error.
>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?
It is not randomly substituting, just disregarding case.
>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
Boy, do you ever exaggerate to make your case.
Sincerely,
Gene Wirchenko
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-20 14:24 -0700
Re: CLI Java Glitch Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-20 14:48 -0700
Re: CLI Java Glitch Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-20 18:49 -0300
Re: CLI Java Glitch Martin Gregorie <martin@address-in-sig.invalid> - 2011-06-20 22:09 +0000
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-21 10:16 +1000
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-21 22:49 +0100
Re: CLI Java Glitch Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-06-21 15:11 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-21 16:37 -0700
Re: CLI Java Glitch Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-06-21 17:54 -0700
Re: CLI Java Glitch lewbloch <lewbloch@gmail.com> - 2011-06-22 09:02 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 10:12 -0700
Re: CLI Java Glitch Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-22 10:39 -0700
Re: CLI Java Glitch Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-22 09:50 -0700
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-22 19:44 +0100
Re: CLI Java Glitch Michael Wojcik <mwojcik@newsguy.com> - 2011-06-23 12:31 -0400
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-23 23:04 +0100
Re: CLI Java Glitch Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-06-23 21:40 -0700
Re: CLI Java Glitch Michael Wojcik <mwojcik@newsguy.com> - 2011-06-24 09:43 -0400
Re: CLI Java Glitch Michael Wojcik <mwojcik@newsguy.com> - 2011-06-23 12:24 -0400
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-23 14:32 -0700
Re: CLI Java Glitch lewbloch <lewbloch@gmail.com> - 2011-06-24 09:12 -0700
Re: CLI Java Glitch Bent C Dalager <bcd@pvv.ntnu.no> - 2011-06-24 22:49 +0000
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-26 20:29 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-21 16:29 -0700
Re: CLI Java Glitch Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-06-22 11:54 +0100
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 10:16 -0700
Re: CLI Java Glitch Patricia Shanahan <pats@acm.org> - 2011-06-22 11:06 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 11:46 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 12:50 -0700
Re: CLI Java Glitch Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-06-23 15:23 +0100
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-23 08:58 -0700
Re: CLI Java Glitch lewbloch <lewbloch@gmail.com> - 2011-06-24 08:58 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-24 11:36 -0700
Re: CLI Java Glitch Paul Cager <paul.cager@googlemail.com> - 2011-06-22 14:45 -0700
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-22 23:29 +0100
Re: CLI Java Glitch Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-22 18:08 -0700
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-23 23:20 +0100
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-24 10:28 +1000
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-25 22:58 +0100
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-26 20:31 -0700
Re: CLI Java Glitch lewbloch <lewbloch@gmail.com> - 2011-06-24 09:00 -0700
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-22 20:00 +0100
Re: CLI Java Glitch Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-06-23 15:18 +0100
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-23 11:40 +1000
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-23 20:21 +1000
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-23 09:00 -0700
Re: CLI Java Glitch Esmond Pitt <esmond.pitt@bigpond.com> - 2011-06-24 10:24 +1000
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-21 22:52 +0100
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 19:11 -0400
Re: CLI Java Glitch Lew Bloch <lewisbloch@google.com> - 2011-06-20 16:25 -0700
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 19:45 -0400
Re: CLI Java Glitch Lew Bloch <lewisbloch@google.com> - 2011-06-20 18:28 -0700
Ping: Lew Bloch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 23:26 -0400
Re: Ping: Lew Bloch Lew Bloch <lewisbloch@google.com> - 2011-06-21 10:25 -0700
Re: Ping: Lew Bloch Jeff Higgins <jeff@invalid.invalid> - 2011-06-21 14:36 -0400
Re: CLI Java Glitch Patricia Shanahan <pats@acm.org> - 2011-06-20 17:02 -0700
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 20:37 -0400
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-20 20:44 -0400
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-21 22:45 +0100
Re: CLI Java Glitch Roedy Green <see_website@mindprod.com.invalid> - 2011-06-20 16:55 -0700
Re: CLI Java Glitch Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-06-20 20:44 -0400
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-20 19:26 -0700
Re: CLI Java Glitch Paul Cager <paul.cager@googlemail.com> - 2011-06-21 02:34 -0700
Re: CLI Java Glitch Silvio <silvio@moc.com> - 2011-06-21 16:50 +0200
Re: CLI Java Glitch "Gavino" <invalid@invalid.invalid> - 2011-06-21 21:35 +0200
Re: CLI Java Glitch Roedy Green <see_website@mindprod.com.invalid> - 2011-06-21 11:59 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-21 13:03 -0700
Re: CLI Java Glitch BGB <cr88192@hotmail.com> - 2011-06-21 14:21 -0700
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-20 19:29 -0700
Re: CLI Java Glitch Tom Anderson <twic@urchin.earth.li> - 2011-06-21 22:42 +0100
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-21 14:48 -0700
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-21 21:52 -0400
Re: CLI Java Glitch Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-22 07:56 -0300
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-22 08:02 -0400
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 10:18 -0700
Re: CLI Java Glitch Jeff Higgins <jeff@invalid.invalid> - 2011-06-22 15:01 -0400
Re: CLI Java Glitch Gene Wirchenko <genew@ocis.net> - 2011-06-22 12:54 -0700
Re: CLI Java Glitch Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-22 18:52 -0300
Re: CLI Java Glitch Michael Wojcik <mwojcik@newsguy.com> - 2011-06-23 15:13 -0400
csiph-web