You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@MangelMaxime No, additional parentheses doesn't cause any issue (except that they make output a bit less readable), I just asked if you know why it was added, it could signal that some unwanted changes were introduced.
Today I've realized that I can find it out myself by checking different versions and found out that extra parentheses appeared in 5.0.0-alpha.13, so it looks like it was this issue and this commit.
But looking at the changes, I'm not sure where those extra parentheses come from.
I believe the additional parentheses are added because we now don't rewrite as aggressively the output.
We are now emitting standard Fable expr, by default Fable wrap expression in certain scenario with parentheses to ensure that they are scopes/executed correctly.
I am closing because I don't think something needs to be acted on for now. We can revisit later if needed
Activity
MangelMaxime commentedon Dec 8, 2025
Hello,
In general Fable makes no guarantee in how the generated code looks like.
Does the additional parentheses cause an issues ?
Lanayx commentedon Dec 8, 2025
@MangelMaxime No, additional parentheses doesn't cause any issue (except that they make output a bit less readable), I just asked if you know why it was added, it could signal that some unwanted changes were introduced.
Today I've realized that I can find it out myself by checking different versions and found out that extra parentheses appeared in
5.0.0-alpha.13, so it looks like it was this issue and this commit.But looking at the changes, I'm not sure where those extra parentheses come from.
MangelMaxime commentedon Dec 9, 2025
I believe the additional parentheses are added because we now don't rewrite as aggressively the output.
We are now emitting standard Fable expr, by default Fable wrap expression in certain scenario with parentheses to ensure that they are scopes/executed correctly.
I am closing because I don't think something needs to be acted on for now. We can revisit later if needed
[-][JS] Fable 4 -> Fable 5 jsx inconsistency[/-][+][JS] Fable 4 -> Fable 5 unnecessary parentheses in ternary expressions[/+]