Comment by jacquesm
5 days ago
> I’ve never seen code written like this in real-world projects
Lucky you. I've seen far worse (at least this is somewhat consistent). But this isn't C anymore, it is a new language built on top of C and then a program written in that language. C is merely the first stage compilation target.
IIRC, C++ started out this way, or at least its precursor ‘C with classes’. A compiler came later.
And everyone says you can't do DSLs in boring old languages. :P
You can certainly do DSLs in C. That’s what SystemC is.