[Pharo-dev] deprecating use traditional formatter

ducasse stepharo at netcourrier.com
Wed Nov 13 04:06:44 EST 2019


I will do it :)

> On 13 Nov 2019, at 10:05, Marcus Denker <marcus.denker at inria.fr> wrote:
> 
> 
> 
>> On 13 Nov 2019, at 09:04, ducasse <stepharo at netcourrier.com> wrote:
>> 
>> Hi 
>> 
>> In the new implementation of the code formattter I will remove useTraditionalPrecedence.
>> This settings put additional parentheses around binary selector but I find it cumbersome
>> 
>> While it may make sense for 
>> 
>> it turns 
>> foo 
>> 	^ 1 + 2 * 3
>> 
>> into 
>> 
>> foo
>>       ^ (1 + 2) * 3
>> 
>> foo 
>>       ^ 1 * 3 + 2 
>> 
>> foo
>> 	^ (1 | 2) % 3
>> 
>> foo
>> 
>>       ^ 1 % 2 | 3 
>> 
>> So let me know what you think but I will be hard to convince :)
>> 
> I vote to remove it.
> 
> The RB AST encodes parenthesis information, so that means that we can have
> a pretty printer keeping the parenthesis if they have been added by the original author.
> 
> Adding new ones makes no sense to me.
> 
> So I vote to remove.
> 
> 	Marcus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20191113/e08c1656/attachment.html>


More information about the Pharo-dev mailing list