
On 11/30/2010 10:09 AM, Marsh Ray wrote:
This stuff has a cost, abstraction isn't free. Witness the threads on template error messages. But when it works out, it can be dynamite: STL.
Spirit is not special. It uses the same template metaprogramming techniques that is prevalent in most of Boost libraries. There is no black magic there.
Haha, I don't think you'll find many people (outside of this list) who don't think it is exactly black magic. :-)
Personally I think it's pretty awesome.
[I'll try to reply to your Spirit related comments in another post. As I see it, your comments there (relating to not being able to make it your code work and that JSON is easy to code in C) is totally irrelevant.]
All I was trying to say was that I could really use a no-fuss, bulletproof JSON facility and Spirit seemed like overkill for this simple format.
I'd like to convince you otherwise. Spirit is meant to be for such simple to moderate parsing tasks such as parsing complex numbers CSV, arithmetic expressions and definitely JSON. The stigma of Spirit (and any TMP heavy libraries for that matter) stems from 1) Outrageous error messages and 2) Long compile times. Possibly third would be the steep learning curve, but that may very well be connected to 1 -It's a pain to get past the error messages, I know; one misstep and you'll get tons of undecipherable errors. That, and the perception of complexity (the black art, if you will), makes it hard for Spirit to be accepted into the mainstream. In reality, beneath the TMP (some say gimmickry), Spirit is actually quite simple. What I wish to do is to dispel that image of complexity and make it simple (again as it was in the beginning). That is our new mission. Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net