Carmack about static analysis

Adam D. Ruppe destructionator at gmail.com
Sat Dec 24 17:05:11 PST 2011


On Saturday, 24 December 2011 at 23:44:11 UTC, Timon Gehr wrote:
> Functional style code tends to be conceptually simpler.

I find bugs creep into things with lots of parameters
or conditions. For instance:

if((flag && request.isSomething()) || request.isSomethingElse()) 
{}

If you have a lot of stuff like that, it's hard to tell what
code is actually running, which makes working with it hard,
even if the other stuff is simple.

This tends to have a good chunk of repetition too, inflating
the size, since you're doing many custom paths for all the
conditions. And that's where you miss stuff.

(On the other hand, I don't have a lot of experience working with
non-example functional code, so maybe this tends to be avoided 
there?)


More information about the Digitalmars-d mailing list