On Feb 19, 2011, at 2:24 PM, Schwab,Wilhelm K wrote:
Stef,
I am not sure that #* would be all that confusing: I tend not to multiply path names all that often :) However, your question is well taken. How about #any or #all?
but any or all do not really have more sense.
Attached are some methods that I use to ease the transition from Dolphin. Most of the calling code needs to be modified anyway (to change to Linux conventions),
thanks I will have a look.
but at least the protocol is familiar. If I were starting over, I might reify paths and define #, to concatenate them.
Bill
________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Stéphane Ducasse [stephane.ducasse@inria.fr] Sent: Friday, February 18, 2011 5:40 PM To: Colin Putney Cc: Pharo Development Subject: [Pharo-project] Need your point of view on FSPath * and others
Colin
I'm continuing adding comments to FS. 1- A question about
FSPath class>>* aString
^ self with: aString
I would like to deprecated FSPath class>>* and use with: since this is the message and
What do you think? I really prefer for static analysis point of view not to pollute numerical behavior with others. Avoiding ad-hoc polymorphism will help us to build static checker in the future.
2- Then I was wondering if it would not be good to have validating creation methods
(FSPath * 'parent/child/') isRelative true (FSPath * '/parent/child/') isAbsolute false because the string is not checked FSPath * '/parejhkjhhg %% ^%$%^(%$546547675 nt??child/'
I saw that there is readFrom: aStream delimiter: aCharacter
so I created an unchecking instance creation category and I added with: and * in it. And added comments
3- Then finally the following confuses me
(FSPath with: 'parent/child/') isRelative true (FSPath with: '/parent/child/') isRelative true (FSPath with: '') isRelative false
Either with: create relative path or isRelative is not consistent. If with: creates relative path then the last one should be true or isRelative should return false on the second one. ?
4 - about FSPath root we have
root "Return the relative root path" ^ self with: ''
FSPath root returns / and I like that
Now what about defining root as
root ^ self with: '/'
It would be more consistent. Now it breaks everything. So I did not do it :)
May be I'm tired after 4 ours teaching and 6 hours train.
Thanks for your time
Stef <File class-file name manipulation.st>