by card_zero · 2y ago · 0 comments
Then again people complain that they are too verbose, and they rather write in hieroglyph friendly languages.
char (*(*x())[5])();
and var x: pointer to func() pointer to array[5] of pointer to func() char;
or if you wish to replace some keywords with glyphs: var x: ^func() ^[5] ^func() char;
And it's always a nice puzzle for the reader to explain why there are three "pointer" in cdecl output and three carets in the ALGOL-like declaration, but only two asterisks in the C declaration. declare x as function returning pointer to array 5 of pointer to function returning char
Using the notation you did, that would be: var x: func() ^[5] ^func() char
There are only two arrows there now.If you wanted a pointer to a function like this, you would need a third asterisk in the declaration:
char (*(*(*x)())[5])();> Using the notation you did, that would be:
Well, it'd be
func x() ^[5] ^func() char; ...
because it's a function declaration, after all, not a variable.Any language with type after name :
// c
char (*(*x[3])())[5];
// golang
var x [3]func() *[5]byte