News for hackers. Stuff that matters.
Re:The cost of forsaking C by rayiner on Wednesday October 05, 2016 @04:19PM (#12647440)
You can't put up a struct because the structure of a C type is arbitrarily complex. E.g. Multiple levels of pointers. So you have to maintain a type as some sort of tree, and then as you're parsing it you have to fill in the right parts of the tree.

Not rocket science, obviously, but the original statement was that C types were designed to be easy to parse, which clearly isn't true. If the types were prefix or postfix, it'd be trivial to build the trees in a recursive descent parser.

Re:The cost of forsaking C by microcolonel on Friday October 07, 2016 @09:20AM (#12660406)
Is it arbitrarily complex? Maybe nested array types, but every other type can be expressed with an indirection count, and a leaf type. That said, if it can't go in a struct, it can easily go in a linked list with the same information for each level of indirection.
Re:The cost of forsaking C by kevinnk on Monday October 10, 2016 @04:19PM (#12679530)
What about function types? That alone gets you to "tree" complexity.