Loki is a research/proof-of-concept sort of thing. Alexandrescu pushes new ideas, other people adopt those for real world. Also boost::shared_ptr is almost literally in TR1.
You want to use a library that the next programmer is going to know and that is going to be well supported in the future - so you pick a major lib. Because it's a major lib lots of people use it, so it becomes the default choice.
Loki's suffers from being a good library touching on several functional areas (template metaprogamming support with a few specific applications: smart pointers, singletons, function objects, scope guards etc. ), whereas boost is a collection of many libraries typically exhaustively covering each functional area and much more highly tuned for portability (first). When 9 birds out of 10 can be killed with the same stone, many people just start with boost and fill in the gaps with third party libraries.It's very hard to compete with boost if you overlap. Because you won't overlap with much of boost, people will download/install boost anyway to get the other functionality, so unless you nail an area that boost is weak at - and the difference is significant to the project, they'll "settle" for boost there too.
Further, Alexandrescu made repeated attempts to get Loki included in boost, and some of the key boost authors just weren't cooperative.My personal view is that they want the more complete but much less user-friendly MPL to have more "market share": as authors of the library and the hard-copy books that are the only decent documentation (in stark contrast with most other boost libraries which have excellent online documentation), they do quite well out of this. If anyone is offended by and disagrees with this analysis, I'm all ears. Another practical issue with extremely parameterised code is that in large projects where different developers/teams work independently, they'll often end up using subtly different instantiations of the same template pretty arbitrarily.
This makes it harder to pass values between those subsystems: the receiver may need to: be parameterised (i.e. Templated, and hence inline, which introduces compilation dependencies and slower builds in enterprise-scale systems) provide some minimal coverage for all possible instantiations (e.g. Checking error codes and expecting/handling exceptions) working through some compile-time to run-time hand-over based on an abstract base accessor with implementations for each instantiation) which compromises some of the performance benefits of parameterisation This is all possible, but it takes a great programmer to navigate the terrain.
Speaking as someone who's used quite a bit of the Boost library, and also looked at Loki more than once, the biggest problem was the sparsity of documentation. Also, Loki uses some of the hairiest bits of C++ templates. Exciting stuff, but also rather daunting.
– Georg Fritzsche Feb 27 '10 at 16:57 3 See the shared_ptr faq: Parameterization discourages users. The shared_ptr template is carefully crafted to meet common needs without extensive parameterization. Some day a highly configurable smart pointer may be invented that is also very easy to use and very hard to misuse.
Until then, shared_ptr is the smart pointer of choice for a wide range of applications. (Those interested in policy based smart pointers should read Modern C++ Design by Andrei Alexandrescu.) – Johannes Schaub - litb Feb 27 '10 at 17:10 1 @litb: As I said on the IRC, I disagree. It just felt more natural to me to use the loki's smart pointer then boost's one.
If I wanted mutex lock on loki's smart pointer I just needed to input a mutex class for it. Loki's smart pointer is the most generic solution I found to the problem. It sometimes makes the use easier.
– the_drow Feb 27 '10 at 19:49.
I used Loki once for a little tool (basically an interpreter) and actually liked it. My coworkers were less enthusiastic about the library, so its use remained constrained to this small sub-project.
I actually prefer Loki's way of doing things and I have contributed to Loki myself a Decorator pattern which now sits in the tracker because the project as far as I know is no longer maintained. I use boost shared_pointer just because it will be the standard very soon, I may dislike the fact that I can't customize it to act exactly the way I want it to act but I have to live with it. Usage of the standard library is important as it keeps the code maintainable by other programmers.
If it's open source and you want to experiment go ahead and use Loki. No one is stopping you. Actually Windows Vista which uses some of Loki's features in it.
I am guessing they are not using the redundant implementations of smart pointers and visitors.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.