[Pharo-project] FileReference convenience
Now that Filesystem is built-in, how about starting to add some convenience methods, like this simple one... FileReference>>#fileIn FileStream fileIn: self fullName. -- View this message in context: http://forum.world.st/FileReference-convenience-tp4609828.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
no! :) fileIn is too complex (and too important) to be a convenience method (IMHO, it should never be in a Stream), it needs it's own class: CodeLoader or something like that. but of course, while I disagree with your particular example, I agree in adding convenience methods when their are convenient ;) best, Esteban On May 4, 2012, at 11:08 PM, Sean P. DeNigris wrote:
Now that Filesystem is built-in, how about starting to add some convenience methods, like this simple one...
FileReference>>#fileIn
FileStream fileIn: self fullName.
-- View this message in context: http://forum.world.st/FileReference-convenience-tp4609828.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Fri, May 4, 2012 at 11:17 PM, Esteban Lorenzano <estebanlm@gmail.com>wrote:
no! :)
fileIn is too complex (and too important) to be a convenience method (IMHO, it should never be in a Stream), it needs it's own class: CodeLoader or something like that.
but of course, while I disagree with your particular example, I agree in adding convenience methods when their are convenient ;)
Don't be so hard, as an extension method should be fine :P. Now, The CodeLoader is a different story, I'll have a look tomorrow to see how hard is to move it :).
best, Esteban
On May 4, 2012, at 11:08 PM, Sean P. DeNigris wrote:
Now that Filesystem is built-in, how about starting to add some convenience methods, like this simple one...
FileReference>>#fileIn
FileStream fileIn: self fullName.
-- View this message in context: http://forum.world.st/FileReference-convenience-tp4609828.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Guillermo Polito wrote
as an extension method should be fine :P.
Right, forgot to mention that part ;-) Package it with whatever class is responsible for filing in (which right now are the streams). -- View this message in context: http://forum.world.st/FileReference-convenience-tp4609828p4609955.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
we should migrate the system to use it so that we can deprecate the old code.
Now that Filesystem is built-in, how about starting to add some convenience methods, like this simple one...
FileReference>>#fileIn
FileStream fileIn: self fullName.
-- View this message in context: http://forum.world.st/FileReference-convenience-tp4609828.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (4)
-
Esteban Lorenzano -
Guillermo Polito -
Sean P. DeNigris -
Stéphane Ducasse