QuoteOriginally posted by: lballabioWe've been talking about offloading functionality to Boost (including signal2. Observer is used everywhere, not only in MC.) I'm not sure if we can do it while keeping backward compatibility, or if we'll have to start a new branch to move towards a version 2.0.There is an intermediate solution, namely keeping the external interface the same e.g. Update() only having to change the code internals (used to do that for a living years ago) from classic GOF to stuff using callback function with Boost or std function and bind. It also means you can have a bunch of callable object types of different styles as observers. BTW this is in my Boost I C++ book.In fact .. you can use Boost signals internally without ruffling any feathers since it's all signature-based, i.e.void Some_Func_Thing(void); // in fact a contract or interface...QuoteC++11 is more tricky. It would be useful, sure, and I'm itching to try it, but I'm guessing that a lot of people are still stuck with versions of VC++ that don't support it. It's more than half in this sample, and I'm under the impression that banking IT departments are more conservative than most...Let them eat Boost (for the moment) . Seems a lot of C++ 11 comes from Boost. The migration path is clear.BTW only a few months ago I saw VC++ 6.0 for the first time since years.I an working in my C++ 2004 book 2nd edition and hope to have manuscript ready by December 2014. I have replaced/complemented most of the GOF patterns by C++ 11 approach, e.g. use std::function as Strategy, Command, Bridge, Template Method ==> no class hierarchy needed. Bingo.// What I am finding is that layering is a good way to compartmentalize code and ensure maintainability.
Last edited by Cuchulainn
on September 23rd, 2014, 10:00 pm, edited 1 time in total.