(no title)
jfr | 15 years ago
Anyways, right at the beginning of the presentation you see the quality of his arguments as he uses a very known problem of a particular compiler (GCC) to bash the language. Sort of a straw man fallacy.
jfr | 15 years ago
Anyways, right at the beginning of the presentation you see the quality of his arguments as he uses a very known problem of a particular compiler (GCC) to bash the language. Sort of a straw man fallacy.
kjksf|15 years ago
The fact that it took gcc programmers 10 years to get to a point where gcc doesn't use ridiculous amounts of memory when compiling few lines of tricky code is a fact in favor of the argument, not against it. Gcc programmers are smarter than an average programmer. If it was easy, they would have gotten it right on the first try. Accordingly, C or Java or C# or Go compilers didn't have such problems so C++ is more complex for compiler writers than pretty much every other known language.
The same goes for error messages. In the past decades we've had tens of C++ compilers. If clang is the first one that is able to generate decent error messages for templates, then it means it was a hard problem to solve.
None of that got any easier: if you want to write another C++ compiler, it'll still be hard for you to generate decent error messages or compile tricky C++ code reasonably.
Someone|15 years ago
Clang, written in C++, is faster, uses less memory, produces better error messages, and, I brink, took less calendar time and man hours to write.
Yes, it is a hard problem to solve, but from these two anecdotes, it seems solving it in C++ is easier than solving it in C.
And yes, I know the above probably is a fallacy; gcc hackers probably spent most of their time working on CPU ports and on getting gcc to produce better code. Begin hackers, and not having a C++ code base themselves, getting good C++ error messages just wasn't important enough for them.
thedigitalengel|15 years ago
http://news.ycombinator.com/item?id=2549657
jfr|15 years ago
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.
KonradKlause|15 years ago
jfr|15 years ago