[BUG] Re: PrettyPrinter strangenesses (3.6 + 3.7beta)

Stephan Rudlof sr at evolgo.de
Sat Jul 17 12:56:54 UTC 2004


Marcus Denker wrote:
> Am 16.07.2004 um 21:47 schrieb Jochen Riekhof:
> ...

>>This method
>>coveredImage
>>  | form |
>>  ^ ((form _ self basicCoveredImage) isKindOf: Form)
>>      ifTrue: [form] ifFalse: [nil]
>>
>>always deletes the ifFalse: [nil] branch on save. Actually I find no  
>>way to enter the required code without switching of pretty printing  
>>altogether:-(

The code isn't *required*, since
	someBool ifTrue: ['Hello!'] ifFalse: [nil]
gives the same result as
	someBool ifTrue: ['Hello!']
.
The pretty printer seems to remove this redundancy, but of course it
makes sense to keep some redundancy in the source for better readability.

>>
> 
> Ok, looks like a bug.

So this not a bug affecting semantics.

> 
> 
>>Also, comments at the end of a method are often removed or moved  
>>somewhere else.

That's bad.

>>Ah yes, and  typing in intention revealing ^self is also always  
>>removed.

This goes into the same direction as my comment about keeping redundancy
 for human beeings...

>>
> 
> 
> I think we will do some work on the pretty printer as soon as the new  
> AST is in the image.

This sounds good!

> 
>      Marcus
> 
> 
> 
> 

-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3



More information about the Squeak-dev mailing list