Hi '/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference printString
"File @ /Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result"
so either we add @ one File or we redefine printString one reference to be '/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference so that we can do something with the printString result. What do you think? Guille is it what we talked together? Setf
Hi Stef, all, I've seen this "inconsistency" as well. The current printSting tries to be descriptive but isn't handy to work with. I would go one step further and have no #asFileReference suffix nor File @ prefix, it is: '/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference printString
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'
If for some reason the option chosen is to keep the current printString then the printString should be:
'File @ ''/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'''
It is, a string with three tokens, the class name, the @ symbol and a string as an argument, that way you can evaluate the result back. I prefer the first one, it enables you to work with files on workspaces, if you're using inspectors the printString doesn't matter much, since you're dealing with a specialized tool and there is no way you can confuse a FileReference with a regular String instance Best regards, Esteban A. Maringolo 2018-02-02 16:12 GMT-03:00 Stephane Ducasse <stepharo.self@gmail.com>:
Hi
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference printString
"File @ /Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result"
so either we add @ one File or we redefine printString one reference to be
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference so that we can do something with the printString result.
What do you think? Guille is it what we talked together?
Setf
Exactly, let us see what others think and we fix it. To me FileSystem deserves some love. On Fri, Feb 2, 2018 at 8:39 PM, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
Hi Stef, all,
I've seen this "inconsistency" as well. The current printSting tries to be descriptive but isn't handy to work with.
I would go one step further and have no #asFileReference suffix nor File @ prefix, it is:
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference printString
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'
If for some reason the option chosen is to keep the current printString then the printString should be:
'File @ ''/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'''
It is, a string with three tokens, the class name, the @ symbol and a string as an argument, that way you can evaluate the result back.
I prefer the first one, it enables you to work with files on workspaces, if you're using inspectors the printString doesn't matter much, since you're dealing with a specialized tool and there is no way you can confuse a FileReference with a regular String instance
Best regards, Esteban A. Maringolo
2018-02-02 16:12 GMT-03:00 Stephane Ducasse <stepharo.self@gmail.com>:
Hi
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference printString
"File @ /Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result"
so either we add @ one File or we redefine printString one reference to be
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference so that we can do something with the printString result.
What do you think? Guille is it what we talked together?
Setf
I saw that guillermo already needed it for pillar Path >> pillarPrintString self isEmpty ifTrue: [ ^ '' ]. ^ String streamContents: [ :str | str nextPutAll: (self at: 1) asString. 2 to: self size do: [:i | str nextPutAll: self delimiter; nextPutAll: (self at: i) ] ] so there is clearly something wrong. On Fri, Feb 2, 2018 at 8:57 PM, Stephane Ducasse <stepharo.self@gmail.com> wrote:
Exactly, let us see what others think and we fix it.
To me FileSystem deserves some love.
On Fri, Feb 2, 2018 at 8:39 PM, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
Hi Stef, all,
I've seen this "inconsistency" as well. The current printSting tries to be descriptive but isn't handy to work with.
I would go one step further and have no #asFileReference suffix nor File @ prefix, it is:
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference printString
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'
If for some reason the option chosen is to keep the current printString then the printString should be:
'File @ ''/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'''
It is, a string with three tokens, the class name, the @ symbol and a string as an argument, that way you can evaluate the result back.
I prefer the first one, it enables you to work with files on workspaces, if you're using inspectors the printString doesn't matter much, since you're dealing with a specialized tool and there is no way you can confuse a FileReference with a regular String instance
Best regards, Esteban A. Maringolo
2018-02-02 16:12 GMT-03:00 Stephane Ducasse <stepharo.self@gmail.com>:
Hi
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference printString
"File @ /Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result"
so either we add @ one File or we redefine printString one reference to be
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference so that we can do something with the printString result.
What do you think? Guille is it what we talked together?
Setf
Hi. I do not think that getting simple string as result is a good idea. It is important to easily distinguish class of object using printIt operation and as a field in raw inspector. During code migration to FileSystem it is classic way to check variables in debugger to see if they are already file references or they are still strings. printIt is very handy in such cases. Best regards, Denis 2018-02-02 20:39 GMT+01:00 Esteban A. Maringolo <emaringolo@gmail.com>:
Hi Stef, all,
I've seen this "inconsistency" as well. The current printSting tries to be descriptive but isn't handy to work with.
I would go one step further and have no #asFileReference suffix nor File @ prefix, it is:
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk- Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference printString
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk- Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'
If for some reason the option chosen is to keep the current printString then the printString should be:
'File @ ''/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk- Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'''
It is, a string with three tokens, the class name, the @ symbol and a string as an argument, that way you can evaluate the result back.
I prefer the first one, it enables you to work with files on workspaces, if you're using inspectors the printString doesn't matter much, since you're dealing with a specialized tool and there is no way you can confuse a FileReference with a regular String instance
Best regards, Esteban A. Maringolo
2018-02-02 16:12 GMT-03:00 Stephane Ducasse <stepharo.self@gmail.com>:
Hi
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk- Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference printString
"File @ /Users/ducasse/Workspace/FirstCircle/MyBooks/Bk- Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result"
so either we add @ one File or we redefine printString one reference to be
'/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk- Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference so that we can do something with the printString result.
What do you think? Guille is it what we talked together?
Setf
2018-02-02 20:39 GMT+01:00 Esteban A. Maringolo <emaringolo@gmail.com>:
If for some reason the option chosen is to keep the current printString then the printString should be:
'File @ ''/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk- Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'''
So I am for this approach
Stephane Ducasse-3 wrote
What do you think?
If it helps, here is some background material⦠- The original issue where we (I) created this behavior, along with the rationale: https://pharo.fogbugz.com/f/cases/7366/FileReferences-have-a-confusing-wrong... - A subsequent ML thread where we discussed this fairly extensively: http://forum.world.st/Why-aFileReference-asString-aFileReference-fullName-is... FTR I am not attached to the current solution and defer to the majority⦠----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
Tx I will reread the threads! On Sat, Feb 3, 2018 at 4:07 AM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Stephane Ducasse-3 wrote
What do you think?
If it helps, here is some background materialâ¦
- The original issue where we (I) created this behavior, along with the rationale: https://pharo.fogbugz.com/f/cases/7366/FileReferences-have-a-confusing-wrong... - A subsequent ML thread where we discussed this fairly extensively: http://forum.world.st/Why-aFileReference-asString-aFileReference-fullName-is...
FTR I am not attached to the current solution and defer to the majorityâ¦
----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
participants (4)
-
Denis Kudriashov -
Esteban A. Maringolo -
Sean P. DeNigris -
Stephane Ducasse