Hmmm! Sometimes, we get stuck in the simplest things. I see you can actually follow the pattern pretty well without indent.
I tend to do everything in small functions the only time I get more then a function call is when I need different calls based on ancestors, and that's also pretty short.
Thank you Mark.
On Fri, Mar 13, 2015 at 12:01 PM, Marc van Grootel < marc.van.grootel@gmail.com> wrote:
Hi France,
If you really need multi-branching if then else the language doesnt require increasing indentation.
if (cond1) then expr1 else if (cond2) then expr2 else expr3
In my opinion this is just as good as using switch, i've seen examples like this even in the spec. Of course readability suffers if there's a lot going on in the expressions such as complete flwor expressions but that's just a matter of breaking up the code in smaller (re-usable) pieces/functions.
Breaking up / refactoring your logic to avoid massive if then else or switch constructs is advisable anyway. But I don't know how your code looks so I cannot say.
hth --Marc