Richard Frith-Macdonald wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2005-03-16 13:11:18 +0000 David Ayers <[EMAIL PROTECTED]> wrote:
Richard Frith-Macdonald wrote:
While my feeling is that the two approaches are fairly evenly balanced
(leaving aside distributed systems, and the fact that we have one system
already working in the libraries, and consideration for the existing
application codebase), I'd like to hear what other people think about the
general prionciples.
FWIW, I believe that the "behind the back" handling (read: implicit conversions) of "\\" to "/" and allowing mixed representations which OPENSTEP for NT has (at least partially), caused us more pain than relief. But this seem like an issue that cygwin and mingw must have also dealt with a lot and maybe we could get some input from there.
If I were to start from scratch I'd probably use the standard POSIX-like representation when dealing with paths yet have some helper methods/functions to explicitly convert NSStrings from/to specific alternative representations to deal with environment variables and such.
I think that supporting distributed systems (which happen not to be discussed here very much for varying reasons) are a very important factor for GNUstep in general and we should insure that can consistently handle such issues.
Thanks for the input ... but I'm not sure I understand you clearly ...
The paragraph 'If I were to start from scratch' sounds like the current
GNUstep code (though the current helper methods are to/from 'native' rather
than 'specific' formats) ... but the first paragraph talking about implicit
conversions could be taken to refer to the current conversion to/from native
format used to make windows system calls. Perhaps though, you mean the sort
of implicit conversion cygwin/msys/mingw systems have done or do with
environment variables and program arguments?
The first paragraph was talking about the implicit conversion that OPENSTEP for NT does. It would allow things like:
[@"test" writeToFile: @"C:\\Temp/test.txt" atomically: YES]; s = [NSString stringWithContentsOfFile: @"C:/Temp\\test.txt"];
I don't know whether we currently also support this on cygwin/msys/mingw but this has lead to real confusion and down right problems with some versions of OPENSTEP (or WebObjects) that didn't always handle it correctly.
But yes, the current GNUstep implementation seem to be pretty much what I would aim at "If I were to start from scratch" plus the conversion methods.
So that we could do something like: env = @"C:\\SomePath\\SomeFile" path = [env pathRepresentationPOSIX]; env = [path pathRepresentationWindows];
Well I don't like the method names but you get the idea. I'm not sure how useful a -pathRepresentationNative would be.
Cheers, David
_______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev