Cdecl – C gibberish ↔ English
cdecl.org
cdecl.org
Too bad SML implementations make it such wizardry to create standalone executables...
char (*(*x())[5])()
into this English description:> declare x as function returning pointer to array 5 of pointer to function returning char
What was really needed was just to disentangle the function declarations, like this:
x: fn () -> &((&fn () -> char)[5])I wonder if it's already been done?
#include "evil.h"
Main then
displayln("Hello, World!");
end
[0] https://git.sr.ht/~shakna/cnoevil3/I don't know if he ever got it finished (or indeed, if it's even possible in a practical sense. The C preprocessor is Turing-complete (edit: more or less, if you're allowed unlimited runs), so it's obviously theoretically possible).
Also, Ritchie could have saved a lot of people a lot of hurt by using a "func" keyword.
1. Just read the clumps in a given decl backwards.
2. Keep the decls of individual concepts in code small enough to grok without breaking your brain. While decls can be mechanically complex, ability to reason about and maintain code is a paramount factor. For C, typedef, struct, nomenclature are friends.
You know, returning an array of triplets of function pointers each of which accept more gloop can be made to be understandable with judicious application of the above. I'm given to understand that this overall approach is all the rage in the Go community ...
Was under the impression they don’t work here.
Will try next time
This should be built into IDEs.