On Thu, Dec 27, 2018 at 12:51:08AM +1300, Martin Tournoij wrote: > On Wed, Dec 26, 2018, at 13:23, Sylvain Bertrand wrote: > > Since llvm is pure c++ madness and gcc is still far from being one: > > gnu gcc sucks less than clang/llvm. yes, GNU gcc sucks less than BSD > > clang/llvm, wow. > > The chosen language is just one "suckless metric". I hold little love > for C++, but I'll choose a well-designed and well-written C++ program > over a badly designed and badly written C program any day of the week. > > A good example to illustrate this point might be procmail: > https://github.com/Distrotech/procmail/blob/master/src/formail.c > > The comment says "seems to be relatively bug free", but I think it's > fair to say that figuring out what that stuff even does is a lot harder > than figuring out the average C++ program, and smaller/well written C++ > programs in particular.
Incomplete. You have to account for the technical cost of the toolchain. A c++ toolchain is light years more expensive than a C toolchain. It's reasonable to speak of coding a C alternative toolchain, it's pure insanity in the case of c++. c++ is inherantly hostile to interop: its ABI is toolchain specific and a nightmare, that's why llvm has llvm-c interface and harfbuzz is actually a C interface with an horrible c++ implementation (intellectual masturbation is quite high there). You have badly written programs in all languages, and mecanically, badly written programs using rich and complex syntax are order of magnitude worse. I am not a fan of C, C has already a syntax which is too rich, and the linux coding guidelines try to fix, a bit, this pb. Plain and simple C is just the choice which sucks less, and I go further, I think this is the only reasonable choice. Drop the language of the hyprocrits and trolls: in your "example" swap C and c++, works the same, actually even better due to toolchain cost. It's a very complex issue, that's why cunning *ss h*les are so much profilic there. -- Sylvain