join

tim Rowledge tim at rowledge.org
Fri Sep 15 00:30:28 UTC 2006


On 14-Sep-06, at 4:57 PM, Keith Hodges wrote:

> Entirely against my will, I once worked in a perl shop, and I  
> noticed that perlites liked joining things.
>
> Whenever I find myself wanting to join a bunch of items together  
> (e.g. to make a path) I am never satisfied with the result and so I  
> took a look at the Collections/String classes to see whether  
> anything fitted nicely.

Well, first point is that you shouldn't make paths like that.  
Filenames are *not* strings. If you use constructs like
FileDirectory default directoryNamed:'foo'
you'd get a properly (well, as properly as we can manage right now)  
made file directory object with a properly formed pathname. It would  
handle platform path separator issues, for example.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
The generation of random numbers is too important to be left to chance.





More information about the Squeak-dev mailing list