This program, when executed, will either return null if you don't give it an array of two numbers, or it will return the value returned from calling function foo, which adds the two numbers together.
Absolutely and beautifully convoluted. Should remind some of you of the nested look of functional languages.
The bulk of my programming language experience is with assorted imperative languages, but I'm currently making another attempt to actually "get" functional languages. And one of my web searches, for a good explanation of what functional programming is all about, led me to the above article; it uses XML, along with Ant and C macros, to describe how Lisp works to functional neophytes.
The Nature of Lisp wrote:
Everything we've learned about Lisp so far can be summarized by a single statement: Lisp is executable XML with a friendlier syntax.
As JSON can store the same sort of data as XML, I assume the parallels hold in your case, too.
Hah, that's neat. Though I've come to discover long ago that converting XML to JSON is not a friendly process. The PHP way is actually kind of buggy - you get correct translations in some cases but you lose data in others.
As for what json++ will be useful for, it will be useful for my brain as the project will provide learning and experience. And maybe it'll just be nifty.