top | item 2548979

(no title)

jfr | 15 years ago

I could use your argument to describe pretty much any modern compiler or framework. "It is extremely hard to write a fast, reliable Java SDK that generates good error messages.", for example.

It took years to GCC to arrive where it is because it contained A LOT of legacy code that have been accumulating since its first versions with C++ support. GCC is a compiler that evolved little by little through long years, and many features were added with little design, to fix punctual problems, which made it difficult to converge to a clean implementation.

Clang, on the other hand, had a good deal of proper design to write a clean, robust compiler. The fact that clang reached where it is in such a short time compared with GCC is a good evidence that it is possible to write a good C++ compiler with nice performance and error reporting if you employ good engineering efforts.

discuss

order

kjksf|15 years ago

No, you couldn't.

No Java compiler has ever generated the kinds of error messages that every single C++ compiler did for template errors. Feel free to give me an example of Java compiler error message that takes 2 screens and fails to give you useful information.

If you compared the complexity of clang C++ front-end with complexity of any Java compiler front-end, you would see a huge difference in complexity (size of the code, time it took to develop).

The first checkin in clang code base was in 2006-06-17. It took almost 5 years and more than 31 thousand checkins to get to current state which is: not done (http://clang.llvm.org/cxx_status.html).

A fully functional, fully compliant Java compilers have been written in fraction of this time by much smaller dev teams.

The facts do not support your claim that "proper design" is enough to write fully compliant C++ front-end in a reasonable amount of time. 5 years of effort of top-notch, highly paid developers to not achieve the goal is not reasonable and it's fully the result of C++ complexity.

coliveira|15 years ago

Except that the problem of understandable error messages for C++ is not solved. That was the whole objective of the proposal of concepts, which were not included due to last minute problems.