Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

char (*(*x())[])()

Name: Anonymous 2012-01-28 18:16

"char (*(*x())[])()
x: function returning pointer to array[] of pointers to function returning char" - K&R, page 122.

Because C is concise and elegant.
Seriously, I am a fan of the language, but this is unforgivable.

Name: Anonymous 2012-01-29 6:11

>>25
Maybe not in C, but it makes sense in some high-level languages.

Let me guess an example usage, a function when called returns an array of locale-specific text functions, thus you'd call the function once, based on a global (since no argument was given in >>1), it retrieves the current selected locale, and gives you an array of functions which return all the translated strings (for that locale). Why functions? Maybe some of them could be date/time-like dynamically generated content.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List