[PATCH v4 1/3] Add support for structured output formatters.

craven at gmx.net craven at gmx.net
Thu Jul 12 04:22:12 PDT 2012


> what is the advantage of having this as one function rather than end_map
> and end_list? Indeed, my choice (but I think most other people would
> disagree) would be to have both functions but still keep state as this
> currently does and then throw an error if the code closes the wrong
> thing.

There's probably no advantage, one way or the other is fine, I'd say.
I've thought about introducing checks into the formatter functions, to
raise errors for improper closing, map_key not inside a map and things
like that, I just wasn't sure that would be acceptable.

> A second question: do you have an implementation in this style for
> s-expressions. I find it hard to tell whether the interface is right
> with just a single example. Even a completely hacky not ready for review
> example would be helpful.

See the attached patch :)

Thanks for the suggestions!

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-an-S-Expression-output-format.patch
Type: text/x-patch
Size: 6661 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120712/44250143/attachment.bin>


More information about the notmuch mailing list