News for hackers. Stuff that matters.
Re:Inverse Parentheses by jeroen on Monday December 22, 2025 @05:49AM (#46353064)
If we actually (as the title seems to imply) invert the parentheses, then for your example we get 1+2)*(3 .

Now all you need are the opening and closing parentheses at the start and end, and we're back to normal.

Re:Inverse Parentheses by swiftcoder on Monday December 22, 2025 @06:22AM (#46353267)
Yeah, that seems a much more robust formulation of the whole thing. Flip all parens and enclose the whole string in more parens.
Re:Inverse Parentheses by chrisweekly on Monday December 22, 2025 @08:40AM (#46354018)
that results in

    (1+2)*(3)  
which is (as GP notes), equivalent to "normal", ie what we do today:

    (1+2)*3  
Right?
Re:Inverse Parentheses by sunir on Monday December 22, 2025 @10:05AM (#46354664)
Thank you. I thought I was going crazy reading the article which doesn’t connect open and close parenthesis :: higher and lower precedence :: indent and outdent :: +1 and -1 and just flip it around to get the opposing polarity.

A real Wesley Crusher moment.