Cross-platform path specification (was RE: Access directory relatively)

Dan Ingalls Dan at SqueakLand.org
Tue Aug 6 22:25:05 UTC 2002


Hi, Guys -

These is in the space of "my two cents", since I haven't thought a lot about it, but...

1.  How about using % -- it's a binary operator that is essentially unused, and it looks like slash.

2.  What about declaring some character (% or something else) to be the Squeak path delimiter in file names, so that it gets translated to the right thing for each platform.  I guess this would be like a poor man's file name class.  Anyway, it would let you use normal string concatenation without having to invent something new, and it could be used in conjunction with % as either the special delimiter, or a special concatenator or both.

As I said, these are just quick thoughts, but perhaps they may be useful.

	- Dan

>How about the comma, since directory construction is so much like concatenation?
>
>On Tuesday, August 6, 2002, at 02:32 PM, Andreas Raab wrote:
>
>>>>>dir := FileDirectory default, 'foo', 'bar', 'baz'.
>>>>
>>>>I like this.
>>>
>>>The selector #, is commonly used for contatenation of
>>> collections (and composites); not for routing.
>>>
>>>Why not:
>>>
>>>    dir := FileDirectory default / 'foo' / 'bar' / 'baz'.
>>
>>'cause that selector is commonly used for division?!
>>
>>>or
>>>    dir := FileDirectory default @ 'foo' @ 'bar' @ 'baz'.
>>
>>And that for point creation?!
>>
>>;-)
>>
>>Cheers,
>>  - Andreas




More information about the Squeak-dev mailing list