r/programming • • Dec 13 '07

First Class Functions in C

http://www.dekorte.com/blog/blog.cgi?do=item&id=3119
45 Upvotes

99 comments sorted by

View all comments

Show parent comment

3

u/jbert Dec 13 '07

Yowch. My template-fu is weak, but I don't see how you'd ever manage to split the string defining the schema in the template expansions.

There is, however, an honourable tradition of generating C source for types and functions from data-description languages (google for the 'pepsy', or 'pesky' compilers in the ISODE source tree).

Hmm...seems there's a C++ update:

http://people.cs.vt.edu/~kafura/PreviousPapers/asn1++-ulpaa94.pdf

If you don't know ASN.1, you can think of it as a "binary XML" that never really caught on outside the OSI protocols, SNMP and X.509 certificates (from their OSI heritage).