2 ms·
> Parallel state trees just always suck (I've also dealt with them in Box2D, some game engines, SVG renderers...), it's probably an antipattern. Just to reinfo
by PaulDavisThe1st 4y ago
> Parallel state trees just always suck (I've also dealt with them in Box2D, some game engines, SVG renderers...), it's probably an antipattern.
Just to reinforce this ... this is the case even with native desktop GUI toolkits. Take the example of GTK. You build a model for a tree/list view using the "nice" data types GTK provides. In Gtkmm (the C++ bindings) it's even easier and actually feels very idiomatic.
However, if you already have a model data structure somewhere in your code for other reasons (for example, your "backend" code isn't allowed to use GUI toolkit objects or APIs), you now have parallel state trees, and they suck just as much here as anywhere else.