[M3devel] Change Pathname abstraction for Windows? was: RE: RC3 build problems, was: RE: caltech-parser NT386 Hudson problems
Olaf Wagner
wagner at elegosoft.com
Fri Aug 28 10:26:35 CEST 2009
Quoting Jay K <jay.krell at cornell.edu>:
> It was backslashes vs. forward slashes as I had originally suspected.
> My debugprinting never hit because I was guessing the elego paths wrong.
> I finally made it always print and tested it in-situ in the VM.
It is amazing how much (pointless) work the difference in pathname
denotations on Windows and POSIX systems has caused and still causes.
While there are some conceptual differences that cannot easily be
generalized (one root <-> many roots, logical <-> physical view of
disks etc.), the simple fact that Windows uses \ instead of /
makes life needlessly difficult for many programmers.
In Modula-3, the Pathname interface is intended to abstract from
this, but this works only to a certain degree. It uses \ as the
arc separator on Windows, while in fact all modern Windows systems
accept both \ and /. I think this should be corrected.
Pathnames should be split into elements at both \ and / on Windows,
and checks for equality should ignore any differences in separator
characters only. Does this sound reasonable?
Is there any (non)obvious problem I'm overseeing right now which
will make this strategy fail?
Olaf
PS: I'm not suggesting we do that in this release of course...
--
Olaf Wagner -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
More information about the M3devel
mailing list