24 Apr
2013
24 Apr
'13
10:42 p.m.
2013/4/24 Vinícius dos Santos Oliveira <vini.ipsmaker@...400...>:
I'm preparing my first set of patches and fixed a bug, but I want to discuss some coding style.
Inherit from Preferences::Observer is the only way to watch for preferences notification?
Yes
You guys seem to use a mix of OO-patterns and sigc combination. What is the preferred?
sigc signals are preferred, but keep in mind that they are slower than virtual functions. In particular, due to catastrophic design errors, disconnecting a slot from a signal takes linear time: https://bugzilla.gnome.org/show_bug.cgi?id=167714
So use sigc if you expect to connect only a few slots and use observers or virtual functions if you expect hundreds.
Regards, Krzysztof