Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9896

Re: A strange behaviour of a File property

From Eric Sosman <esosman@ieee-dot-org.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: A strange behaviour of a File property
Date 2011-11-12 21:11 -0500
Organization A noiseless patient Spider
Message-ID <j9n919$q0q$1@dont-email.me> (permalink)
References (1 earlier) <slrnjbqj37.fvg.avl@gamma.logic.tuwien.ac.at> <j9kion$7o7$1@dont-email.me> <slrnjbrpia.fvg.avl@gamma.logic.tuwien.ac.at> <4ebef267$0$290$14726298@news.sunsite.dk> <slrnjbu6hr.fvg.avl@gamma.logic.tuwien.ac.at>

Show all headers | View raw


On 11/12/2011 8:15 PM, Andreas Leitgeb wrote:
> Arne Vajhøj<arne@vajhoej.dk>  wrote:
>> On 11/11/2011 10:21 PM, Andreas Leitgeb wrote:
>>> Eric Sosman<esosman@ieee-dot-org.invalid>   wrote:
>>>> IMHO, Java errs in exposing any "path separator" at all, because
>>>> it just encourages string-bashing.  Note that in some file systems
>>>> there is no such thing as a "path separator;" on one such I had
>>>> files with names like
>>>> 	SYS$DISK:[USERS.ERIC.PROJECT]README.TXT;22
>>> Such beasts still exist in the wild?
>
>> $ type DISK2:[ARNE]HELLOWORLD.JAVA;1
> [...]
>
> This doesn't yet answer the "in the wild"-part:   Is that a machine
> still in productive use, or is it merely running under a VAX-emulator
> on a PC (just for playing around)? :-)
>
> Anyway, as it seems (gathered from googled pages), java is able to
> translate paths like "/disk2/arne/helloworld.java" to what the
> system understands, so there'd not really be much of a need for a Java
> programmer to explicitly deal with those path construction pecularities.

     Speaking as a person who wrote code that tried to mediate
between VMS ("structured") file names and Unix ("just glob it") paths,
I am here to tell you that there are many subtle traps.  Version numbers
inevitably got garbled, if not "in translation" then "in manipulation"
on the other side of the fence.  The fact that the parent directory of

	SYS$DISK:[USERS.ERIC.PROJECT]README.TXT;22
was
	SYS$DISK:[USERS.ERIC]PROJECT.DIR;1

baffled innumerable Unixoid programs that thought they could just "take
everything before the rightmost separator" to get the parent's name.
Anybody who thinks the mapping is half a day's work has got another
think coming -- and weeks of unplanned labor, too.  I've got the scars.

     Common LISP supported a richer filename abstraction, one that could
handle Unix and DOS and Apollo and Mac and VMS and probably others I wot
not of.  Steele was certainly aware of LISP's capability (he made money
off a LISP book, after all), so Java's blinkered view is puzzling.

     IMHO, File is the second-sloppiest "everyday" core Java class,
losing out only to Date (if "losing" is the right word).

-- 
Eric Sosman
esosman@ieee-dot-org.invalid

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

A strange behaviour of a File property alelvb@inwind.it - 2011-11-11 05:45 -0800
  Re: A strange behaviour of a File property Lew <lewbloch@gmail.com> - 2011-11-11 07:34 -0800
    Re: A strange behaviour of a File property alelvb@inwind.it - 2011-11-11 09:28 -0800
      Re: A strange behaviour of a File property Lew <lewbloch@gmail.com> - 2011-11-11 14:17 -0800
        Re: A strange behaviour of a File property alelvb@inwind.it (Alexo) - 2011-11-12 15:04 +0100
          Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-12 09:15 -0500
            Re: A strange behaviour of a File property alelvb@inwind.it (Alexo) - 2011-11-12 16:17 +0100
              Re: A strange behaviour of a File property Zlatko Đurić <zladuric@gmail.com> - 2011-11-12 16:09 +0100
              Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-12 10:13 -0500
  Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-11 16:25 +0000
    Re: A strange behaviour of a File property alelvb@inwind.it - 2011-11-11 09:42 -0800
      Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-11 13:24 -0500
    Re: A strange behaviour of a File property Lew <lewbloch@gmail.com> - 2011-11-11 14:13 -0800
    Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-11 20:38 -0500
      Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-12 03:21 +0000
        Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-12 08:26 -0500
          Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-12 22:09 +0000
            Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 17:40 -0500
              Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 01:28 +0000
                Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 20:42 -0500
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 12:15 +0000
                Re: A strange behaviour of a File property Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-13 12:42 +0000
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 13:06 +0000
        Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 17:25 -0500
          Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 01:15 +0000
            Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 20:40 -0500
              Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 12:42 +0000
            Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-12 21:11 -0500
              Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 20:50 +0000
                Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-14 08:18 -0500
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-14 17:38 +0000
                Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-14 21:51 -0500
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-15 14:17 +0000
                Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-15 22:20 -0500
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-16 12:14 +0000
                Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-16 08:10 -0500
      Re: A strange behaviour of a File property Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-11 19:46 -0800
      Re: A strange behaviour of a File property Owen Jacobson <angrybaldguy@gmail.com> - 2011-11-14 00:24 -0500
        Re: A strange behaviour of a File property Lew <lewbloch@gmail.com> - 2011-11-13 22:00 -0800
  Re: A strange behaviour of a File property Roedy Green <see_website@mindprod.com.invalid> - 2011-11-12 05:00 -0800
    Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 09:15 -0500

csiph-web