Interesting take on the PLO - page 7

 
Igor Makanu:

This is how I write if an endless if-else check starts

dunno ) in such cases, a table (array) of matches and a function is the fastest and most readable
 
TheXpert:
dunno ) in such cases, a table (array) of matches and a function is the fastest and most readable

with linear logic yes, but if the branches If are different, then the matching arrays will be of the dimension of the largest branch If.... is not always rational either.

 
Better to code and trade as a team, you won't make all the money anyway
 
BillionerClub:
It's better to code and trade in a team, you won't make all the money anyway

if "cod" then "peddle" :-)

 
Maxim Kuznetsov:

if "cod" it's "bidding" :-)

not yet in the slang

 
Igor Makanu:

This is how I write if an endless if-else check starts

imho, it's readable, it can be corrected on any line - you can unpin/debug, you can comment it out I'm comfortable with, code above... i don't know how to read it, how to modify it, how ... only questions, what does it give - at most don't write if-else ?

When enum sampling - switch is inevitable
 
Vladimir Simakov:
When sampling by enum, switch is inescapable

Googled this question last year

it depends on the number, if it is small, well, a dozen - it does not matter what to use, if the number is significant, then switch is better - one of the developers wrote


the question was different - .... why write such a code )))

 
Igor Makanu:

Googled this question last year

it depends on the number, if it is not too much, well, a dozen - it does not matter what to use, if the number is large, then switch is better - one of the developers wrote


the question was different - .... why write such a code ))))

of course, i'm not an mql developer,

but in C switch produces pretty efficient binary search and doesn't cause unnecessary paging and cache flipping. So, yes, it's often better than indirect addressing via arrays and structures

 
Igor Makanu:

the question was, in general, about the other thing - .... why write such code )))

I write it this way because I like it. But when debugging it, it gets very bad.


Even in this expression

bool b = f() || g();

it's hard to understand who returned what. In more complex ones (I'm practicing it all the time) it's very hard.

 
fxsaber:

I write this way because I like it. That said, it gets really bad when debugging.


Even in this expression.

it's hard to figure out who returned what. In more complex ones (I practice it all the time) it's hard at all.

Finally - the moment of truth. I was beginning to think that some new type of people had appeared - adepts of horizontally oriented code. But no - it turns out they (you) have everything as people do))

Reason: