3 ms·
What if I told you that even declarations like char const *(* const (*(*ip)())[])[] are trivial to read? [Read this](http://www.icce.rug.nl/documents/cplu
by clishem 10y ago
What if I told you that even declarations like
char const *(* const (*(*ip)())[])[]
are trivial to read? [Read this](http://www.icce.rug.nl/documents/cplusplus/cplusplus03.html#an116 http://www.icce.rug.nl/documents/cplusplus/cplusplus03.html#...) and you'll never struggle with any declaration ever again.
- Rangi42 10y ago"Unambiguous" is not the same as "trivial". C code generally reads left to right, so a trivial syntax for declaring, say, an array of const pointers to functions that take a const pointer to a char and return a const pointer to a char, would have tokens for those things in that order.
- userbinator 10y agoC code generally reads left to right No it doesn't: p += k[foo(bar, baz, 3*(quux+1))] << 32-m[++i];
- int_19h 10y agoI know the rules, and how to apply them. But they are not trivial. The fact that such documents need to be written in the first place, and the fact that utilities like cdecl exist, is a strong testimony to that.