5 ms·
Oberon vs. C++ (1994)
- Aardwolf 12y ago> argument saying that "VAR v: POINTER TO x;" is better than "struct x * v;" Meh, each to their own I guess, but I definitely prefer C++ over that bloated syntax, where "x* v;" is sufficient by the way.
- pdw 12y agoWhile 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: (*signal(int sigcatch, void (*func)(int sigraised)))(int); I can't think of any C-derived language (other than C++) that uses C-style declarations.
- berkut 12y agoThat's for function pointers though, which is a bit different...
- chubot 12y agoI 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...
- AnimalMuppet 12y ago> [Garbage collection] is a necessary prerequisite for robust and reliable extensible software systems that will become more and more important in the future. In retrospect, that seems somewhat naïve. And that syntax... avoiding that horrible verbosity is one of the reasons that I preferred C to Pascal. It just feels really clumsy. Most of the "deficiencies" in C++ have been corrected in time, and it took over the world. This shouldn't be a terrible surprise - the practical people get stuff done while the academics argue that their design is superior. Since language use for actually getting stuff done determines "winning" in the language wars, the pragmatic languages keep winning. They steal where the academics actually had better ideas, and they ignore the rest. And so the academics get left in the dust over and over...
- Avshalom 12y agoI wasn't here in 94, but I get the feeling C++ took over the world THEN its deficiencies got mostly fixed.
- AnimalMuppet 12y agoWell, at the time the article was written, cfront was still the C++ implementation, so this was a really long time ago. C++ was arguably as bad as the article said... then. I'd say that C++ being fixed and becoming more popular took place in parallel. As it got used more, people saw more things that needed fixed, and as more things got fixed, it became more useful for more people. Why did things get fixed nearly as fast as they got identified as problems? Because there was an arms race between Borland and Microsoft to have the best C++ compiler, primarily. That competition did wonders for the language (neglecting the horror of Microsoft's incompatible and ugly extensions...)
- mamcx 12y agoNone of deficiencies have been corrected. Just are added tons and tons of new features, leaving the old-cruft there.
- AnimalMuppet 12y ago