Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-08-21 09:57:50


At 05:46 PM 8/18/2003, Peter Dimov wrote:
>David Abrahams wrote:
>>
>> Sure; I just don't want to have to be explicit about anything just to
>> say "I'm doing native path manipulation", since I believe that's the
>> 90% case. I don't want to be stopped by irrelevant portable path
>> considerations nor uglify my code to avoid it.
>
>I agree except that IMO the 90+% case is "I'm doing generic path
>manipulation" which is portable path format ("x/y", not "x\y" or "x:y")
but
>no constraints on charset except of course '/' and '\0'.

Yes, that's the point I made in a reply to Dave; it is quite desirable to
specify the default syntax as generic but it is possible and perhaps even
desirable to specify the default name checker as something else.

That "something else" could be "none", as you suggest above, or "native".
The advantage of "native" is earlier detection.

Presumably if a program uses some character in a name that isn't allowed on
the native platform, the error will be detected when the path is actually
used in some operation. That may come a long time (due to heavy computation
or I/O, or because the use only occurs rarely) after the path was created.
I've had error reports when this happened with some commercial software I
wrote. The operator entered an invalid name for an error file, and it was a
long time before the file was used, forcing a long job to be rerun. Thus
early error detection can be a plus.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk