Re:Oberon vs. C++ (1994)
by pdw on Wednesday March 25, 2015 @01:45PM
(#9264553)
While Oberon is a bit verbose, the C/C++ declaration syntax is a train wreck. Consider the declaration of signal(), which does not have a very complicated type:
I can't think of any C-derived language (other than C++) that uses C-style declarations.
[ Parent
| on HN ]
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.Yes, 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...)
Re:Oberon vs. C++ (1994)
by banachtarski on Wednesday March 25, 2015 @02:27PM
(#9264922)
Seems to? How can you even know how to comment on the gotchas if you don't know them?
The 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.)
Re:Oberon vs. C++ (1994)
by banachtarski on Thursday March 26, 2015 @03:58PM
(#9272621)
Every language has gotchas...
Re:Oberon vs. C++ (1994)
by the_why_of_y on Wednesday March 25, 2015 @07:42PM
(#9266837)
Scott Meyers seems to have made a career out of documenting them in his books.