Cyclic Dependencies.

Posted by PhilCK on Game Development See other posts from Game Development or by PhilCK
Published on 2010-12-28T01:04:07Z Indexed on 2010/12/28 3:01 UTC
Read the original article Hit count: 382

Filed under:
|
|

Are cyclic dependencies a common thing in games dev? I ask as I keep getting into situation where I'm using and have been told more than once that they should be avoided.

I am wondering if this is just a what people say as a general rule of thumb in the software development business. and that the nature of game programming produces such dependencies.

// Foo
#include <Bar.hpp>
class Foo {
    bar& m_bar;
};

and

// Bar
class Foo;
class Bar {
    Foo* m_foo;
};

I do this alot in Ruby, but dynamic languages are more forgiving in this instance, where as static ones, not so much.

© Game Development or respective owner

Related posts about game-design

Related posts about c++