Path name survey

djberg96 on 2004-12-13T16:04:29

"A path name is-a String".

True or false?

I say "true", but I seem to be in the minority. Most folks seem not to be able to conceptually separate the *name* from the physical node on the disk.


sure it is

rjbs on 2004-12-13T19:04:23

It has properties beyond those of a string, indicating well-formedness, existence of its target, and so on. Still, it is a string. What's the counter-argument?

Re:sure it is

Dom2 on 2004-12-13T20:45:00

What about UTF-8 filenames? And Unix filenames have additional restrictions: no NULL or slash characters. It may be a string, but it's probably got it's own encoding rules.

-Dom

Re:sure it is

rjbs on 2004-12-13T21:11:12

Yes. Those sort of well-formedness rules are the things that add to and restrict the kind of string that a path name is. An integer is a number, even though it's a restricted kind.

mmmm...

jplindstrom on 2004-12-13T19:17:16

The stringiness of a path name isn't the important thing, it's the pathiness :)

I'd say a path name should have an asString method that can represent the path name as a string (duh :), but not that it is-a string.