
2 Jun
2005
2 Jun
'05
2:01 p.m.
Beman Dawes wrote:
Question: what should path("foo//bar//").string() yield?
1) "foo//bar//" 2) "foo/bar/" 3) "foo/bar/."
I'm leaning toward (2). Any comments?
What happens if the user wants to start concatenating filenames on the end of the path? Ideally they will use library facilities of course <g> But if they insist on doing it the hard way, (2) 'just works', (3) requires additional parsing to remove the trailing '.' and (1) is still the oddball - for both good and ill. For me that makes it a call between (1) and (2), and I am in favour of (2) as I prefer to have a single, well defined portable representation - not something else I will need to parse again with yet another library. I think this means we are in agreement <g> AlisdairM