Cyclic Dependencies.
- by PhilCK
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.