I have added JSONParser & friends to the sandbox. The code was ported from JSON Parser. At first, I intended to wrap the library, but things got really messy, so I decided to pull out what I need and tweak it into a more tidy codebase. Experience was a nice reminder of why I have evolved from C to C++ (flames welcome ;-). At any rate, I’m quite satisfied with the outcome and if anyone has use for this, please do some testing and give feedback. This is just an initial approach and I have only compiled it on Windows w/ VS 2008.
Archive: July, 2009
July 31, 2009
July 25, 2009
… which is now C++1x (and hoping x is small number).
Concepts were, in my opinion, really cool feature (types of types) that would have greatly improved template compilation error reporting and also provide help in documenting iterators as well as getting rid of traits. Stroustrup has put 7 years of work into the feature. The door has been left open to introduce them in the next standard, though.
Not the end of the world, but disappointing nevertheless.
I like this part from Sutter:
It’s important to remember that, in 1994, C++ was the only major language whose type genericity capabilities were strong enough to create the Standard Template Library (STL). Today, 15 years later, that is still true; you can’t express the STL’s containers-algorithms design separation well, or at all, using generics facilities in Ada, Java, .NET, or any other significant commercial or research language that I know of; as we learned when doingSTL.NET, you can do the containers well with other generics, but not the orthogonalization with algorithms that is the heart of STL design style. Concepts or not, that hasn’t changed.
So my personal view is that templates have been in the 21st century since about 1994. No other language has yet caught up to their expressive power. And C++0x is adding some further power to templates, in particular by adding variadic templates and template aliases, both of which will help to simplify template code.
Or, as Scott Meyers put it:
In Effective STL (Addison-Wesley, 2001), I wrote, “In the nearly 30 years I’ve been programming, I’ve never seen anything like the STL.” It’s now over 30 years, and I still haven’t.