[NIT] Pretty pretting #ifFalse:ifTrue:

Dan Ingalls Dan at SqueakLand.org
Tue Nov 20 19:32:26 UTC 2001


Bijan Parsia <bparsia at email.unc.edu>  wrote...

>Turns out that pretty printing rewrites #ifFalse:ifTrue: to
>#ifTrue:ifFalse:

...lots snipped and many messages later...

Well, it's been a pretty good thread, and I do have a couple of things to add.

1.  It has always been our intention to sternly preserve semantics through pretty printing.  Whenever we do a major release, I check that the whole system runs happily if recompiled from the prettied version of each method.  This is very important for major-shrunk versions of the system that *depend* on decompilation.  For that reason (and that I wrote the code for ifTrue:, etc) I was pretty sure that Tim's complaint was not well-founded.

2.  I agree that it is annoying to unacceptable, for source-to-source transformations such as coloring and reformatting to introduce artifacts of optimization (25 year ago it seemed amazing; now it seems stupid ;-).  I think it would be quite simple (ie, a couple of methods) to fix the most egregious sins here, and we probably should do this.  We need only to note the original form prior to macro transformations, and then check for such notations when printing transformable parse nodes.

3.  If Henrik has really cleaned this up properly, we may want adopt his code.

	- Dan




More information about the Squeak-dev mailing list