Hi Mark, On Mon, Oct 25, 2010 at 7:41 AM, Mark Wright <[email protected]> wrote: > Hi, > > flex_string included in Loki, and hidden away in the implementation > of one of the Boost libraries, is a policy based design string class > described in Modern C++ Design by Alexandrescu: > > http://www.drdobbs.com/184403784 >
Cool, thanks for the link. I myself have some issue with policy-based design as it puts too much of a burden on the user and implementer in case: 1) The user wants to choose a different policy or mix of policies from the default. 2) The implementer wants to add new policies and/or change the internal details of the implementation. The reason why cpp-netlib has just a tag dispatch mechanism and has all traits/metafunctions deal with the tags is to put the burden on the implementers/extenders instead of the users. This is a different tradeoff, and even if we do use policy-based design internally, the users don't ever have to see these policies -- they just choose which tag or combination of tags they want. > Its neat as the user can choose whether they want thread locking > or not, as well as the copy semantics. > Yeah, but that's overkill really for what I want to do -- I just want a string that's immutable. :) > Thanks, Mark Thank you too Mark. :) -- Dean Michael Berris deanberris.com ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Cpp-netlib-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel
