|
|
|
|
|
by balor123
4286 days ago
|
|
Tempting but extra levels of indentation also lead to poor readability. The other problem is that this style of programming isn't commonplace and will throw off new readers. Better to just stick to a standard program, broken up into pseudocode I think. Technically, the bind time of variables are still the entire function but in practice you can choose to limit the useful scope of a variable to the code block where it is defined. It doesn't take a master coder to notice quickly that the first variable at the top is the one to remember going down the lines. The only remaining problems, then, are that variable names become a little longer to avoid conflicts between the code blocks and the compiler probably won't be able to optimize the function as well as you'd like to, since some extra variables stick around for longer when not needed. |
|