<br><br><div class="gmail_quote">On Mon, Jul 26, 2010 at 16:15, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Mon, Jul 26, 2010 at 8:46 AM, Laurent <<a href="mailto:laurent.orseau@gmail.com">laurent.orseau@gmail.com</a>> wrote:<br>
><br>
>> >> Since there was no right answer, we decided not to pick either of them.<br>
>> >> The lack of a `read'able form is a weak hint to programmers that they<br>
>> >> need to look closely at the question.<br>
>> ><br>
>> > Thanks, I understand.<br>
>> > Maybe we could distinguish between `read'able and un`read'able paths?<br>
>><br>
>> But there are no (guaranteed to be) readable paths because the<br>
>> underlying filesystem may use a bizarro encoding. (I think you're<br>
>> unlikely to run into problems with (7-bit) ascii paths, but I don't<br>
>> think that it is guaranteed.)<br>
>><br>
><br>
> Hmm, that begins to be complex indeed...<br>
> But I'm stubborn, let's see where that can get:<br>
> I suppose Racket knows what kind of path-encoding exists on the system it<br>
> runs on.<br>
> Then it can say "Sorry, this path is supposed to be readable, but that has<br>
> no meaning on your bizarro filesystem encoding".<br>
> Then you can focus on most common file-systems and most common `read'able<br>
> paths, like those using plain 8-bit ascii (I think), and have<br>
> #<readable-path:...> that can be read on such common systems, otherwise<br>
> raise a read-error exception (as it does now) on other systems, and also<br>
> have #<unreadable-path:...> which always raise such an exception.<br>
><br>
> Feature for most is still better than no feature, no? (I'm not talking about<br>
> the time/energy that that would require to implement)<br>
> Probably 90% of the paths could then be `read'able, but I may be mistaken.<br>
> Maybe I don't see the entire issue.<br>
<br>
</div></div>I believe that this amounts to doing option 2 from Matthew's earlier<br>
message. If you know you're not moving to a different filesystem, it<br>
is safe to use path->bytes to marshall things (but not safe in<br>
general).<br>
<br>
In any case, I'm still in agreement with Matthew that if it can fail<br>
in mysterious ways, the "weak hint" is the right design choice (altho<br>
it has been a pain for me in the past too).<br>
<font color="#888888"><br></font></blockquote><div> </div><div>Ok, thank you both for your answers.<br><br>Laurent<br></div></div><br>