3 ms·
I basically just typedef away the ugly syntax. It basically works. Though I wish you could use typedefs in prototypes, like typedef int signal_func(int s
by chubot 12y ago
I basically just typedef away the ugly syntax. It basically works. Though I wish you could use typedefs in prototypes, like
typedef int signal_func(int sigcatch, raised_func f);
foo.h:
signal_func* p_handler;
foo.cc:
signal_func my_handler {
...
}
This would avoid a lot of repetition and is easier to read IMO.
- pdw 12y agoYes, C works if you know how to avoid the gotchas. It'd be nicer if the gotchas weren't there. It's not as if they add value to the language. (C++ OTOH seems to have too many gotchas to learn them all...)
- banachtarski 12y agoSeems to? How can you even know how to comment on the gotchas if you don't know them?
- the_why_of_y 12y agoScott Meyers seems to have made a career out of documenting them in his books.
- troubled5 12y agoThe statement is about the viability of learning all gotchas of C++, and to make a credible point on this you just need to know there exists a large number of them. (Indeed knowing all, or merely many, of the gotchas would speak against the conjecture.)
- banachtarski 12y agoEvery language has gotchas...