News for hackers. Stuff that matters.
Re:Oberon vs. C++ (1994) by Aardwolf on Wednesday March 25, 2015 @01:24PM (#9264402)
> 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.

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:

    (*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.
Re:Oberon vs. C++ (1994) by chubot on Wednesday March 25, 2015 @02:04PM (#9264740)
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.
Re:Oberon vs. C++ (1994) by pdw on Wednesday March 25, 2015 @02:13PM (#9264817)
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?
Re:Oberon vs. C++ (1994) by troubled5 on Wednesday March 25, 2015 @09:34PM (#9267283)
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.
Re:Oberon vs. C++ (1994) by berkut on Wednesday March 25, 2015 @01:49PM (#9264583)
That's for function pointers though, which is a bit different...