Hinrik Örn Sigurðsson wrote:
I was wondering if there had been any discussion about how to type
file and directory names in Perl 6. I've read a couple of posts about
file test operators, where some have suggested making filenames
special, either as a subtype of Str or something else entirely. That
way Str wouldn't have all these file test methods, which is good
because not all strings are valid filenames.

Considering that in the general case a file name can be any string at all, if it is going to have its own type at all, it should be disjoint from Str in the same manner that, say, Instant and Duration are disjoint from Num/Rat. When I say "disjoint", I mean conceptually that "FileName" say has an attribute of type Str rather than being defined as a subtype of Str. -- Darren Duncan

Reply via email to