Symbol and Array printOn:

Stephane Ducasse ducasse at iam.unibe.ch
Tue Jan 11 13:39:40 UTC 2000


Hi all

Is there a reason why symbols and arrays are not printed with # like in VW
This has the main advantage that we can reuse a printed result while
evaluating another expression. Moreover the textual representation conveys
the fact that the expression is self-valuated (in the lisp metaphor).
 

I attached the changes that are really stupid.


Stephane DUCASSE (ducasse at iam.unibe.ch) http://www.iam.unibe.ch/~ducasse/
"if you knew today was your last day on earth, what would you do 
different? ... especially if, by doing something different, today 
might not be your last day on earth" Calvin&Hobbes

University of Bern, Institut fuer informatik and Mathematik
IAM-SCG, 10 neubruckstrasse, CH-3012 Bern, Switzerland.

-------------- next part --------------
'From Squeak2.7 of 5 January 2000 [latest update: #1762] on 9 January 2000 at 9:03:11 am'!
"Change Set:		symbol array printing
Date:			9 January 2000
Author:			Stephane Ducasse

Two trivial changes of Symbol>>printOn: and Array>>printOn:
to have printed representation 'self evaluated' like in VW (the printed expression
can be used for new evaluation:
#lulu -> #lulu and not lulu
#(a b c d ) -> #(#a #b #c #d ) and not (a b c d)"!


!Array methodsFor: 'printing' stamp: 'SD 1/9/2000 08:58'!
printOn: aStream

	
	aStream  nextPut: $# ; nextPut: $(.
	self do: [:element | element printOn: aStream. aStream space].
	aStream nextPut: $)! !


!Symbol methodsFor: 'printing' stamp: 'SD 1/9/2000 08:58'!
printOn: aStream

	aStream nextPut: $# ; 
			nextPutAll: self! !




More information about the Squeak-dev mailing list