Is there a convention for writing If
expressions to visually differentiate between the different arguments? For example:
If[conditional,
expr1;
expr2;
expr3,
expr4;
expr5
]
In this code, it is very difficult at a glance to notice that the ,
after expr3
marks the separation between the true and false parts of the expression. Using Extend Selection works, but can only highlight one full potion at a times, making examining nested statements cumbersome. A potential solution would be to abstract the expressions into multiple functions, but when the code is only a few lines long this seems like overkill. Wrapping each argument in a singe function, like
If[conditional,
Module[{},
expr1;
expr2;
expr3
],
Module[{},
expr4;
expr5
]
]
works somewhat, but does increase indentation, which is annoying for nested expressions
Is there a better solution, or should I just pick something and stick with it?