[Pharo-project] {Spam?} about printOnDelimiter vs asStringOn: delimiter:

Bill Schwab BSchwab at anest.ufl.edu
Fri Jan 16 14:44:32 EST 2009


Stef,

I suspect that Object Arts would favor #printOn:delimiter:.  They would
also probably have a #displayOn:delimeter: method.  Their approach is
that one 'displays' for users and 'prints' for developers; they
generally don't much like #as* methods, with the exception of true
conversion methods (such as #asOrderedCollection, etc.).  #displayOn: is
used my morphic, which will cause me some hassles some time soon.

FWIW.

Bill




Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254

Email: bschwab at anest.ufl.edu
Tel: (352) 273-6785
FAX: (352) 392-7029


>>> stephane.ducasse at inria.fr 1/16/2009 12:55:53 PM >>>
Hi all

I would like to have your point of view on the following:
on the class collection there are two methods

asStringOn: aStream delimiter: delimString
asStringOn: aStream delimiter: delimString last: lastDelimString


printOn: aStream delimiter: delimString
printOn: aStream delimiter: delimString last: lastDelimString

which are nearly doing the same.
I suggest to remove the printOn: version

since it prints:
	 '1'', ''2'' & ''3'.
while asString
	'1, 2 & 3'

I do not see any use of the printOn version and there is no sender  
(except tests that I will remove :).


Stef


_______________________________________________
Pharo-project mailing list
Pharo-project at lists.gforge.inria.fr 
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project




More information about the Pharo-dev mailing list