Just started and having phun.
Can ne one tell me how deep is too deep when Nesting Parentheses in complex expressions for MS Visual C++ - 6
One thing this tut dusnt touch on.
prolly a matter for debate I wld imagine :confused:
Printable View
Just started and having phun.
Can ne one tell me how deep is too deep when Nesting Parentheses in complex expressions for MS Visual C++ - 6
One thing this tut dusnt touch on.
prolly a matter for debate I wld imagine :confused:
If there is one, I'm not aware of it and certainly have never hit it. If you are nesting things very deeply, you probably have a design issue.
Keep it simple.
The maximum depth of {} is 247.
I'd imagine a similar number for ( ), why don't you try it?
try to aviod nesting too many parenthesis, because it'll make your program difficult to read.
The only situation I can think of where knowing that limit might be useful, would be if you're automatically generating source code for some purpose.
I would personally do a redesign of anything nested more then three deep, and I think it's better to basically never nest anything unless doing things otherwise would become overly complex.
I think it is good to stress program simplicity, modularity and readability over perceived efficiency.
Thanks Peeps,
I good to get a few opinions, I think ovverall for the sake of simplicity and beacuse I will want to reuse the code in future, three deep is a good rule of thumb.
Thanks for your input