Live data from Hacker News

How to convince any C developer to dump gcc and use clang

fseek.me

51–60 of 97 posts

Re: How to convince any C developer to dump gcc and use clang

#52
post #10

you're saying I should port all my code just because the ui is more user-friendly? what about performance, options, special warnings, builtins, and everything else? I've been using gcc for a while now, and every time I use it I found a new feature. It's rock solid and had never let me down.

wow, just wow. how about read what clang actually is before posting?

Re: How to convince any C developer to dump gcc and use clang

#53
post #10

you're saying I should port all my code just because the ui is more user-friendly? what about performance, options, special warnings, builtins, and everything else? I've been using gcc for a while now, and every time I use it I found a new feature. It's rock solid and had never let me down.

just because the ui is more user-friendly? Those better warnings aren't just due to a simple UI patch ... clang is doing better and deeper static analysis than gcc in order to even be able to produce those more intelligent warnings.

There is nothing deep about these warnings. It would likely be really, really simple to add them to gcc.

Re: How to convince any C developer to dump gcc and use clang

#54
post #53

Earlier quoted context omitted.

just because the ui is more user-friendly? Those better warnings aren't just due to a simple UI patch ... clang is doing better and deeper static analysis than gcc in order to even be able to produce those more intelligent warnings.

There is nothing deep about these warnings. It would likely be really, really simple to add them to gcc.

And yet, gcc doesn't have them.

Re: How to convince any C developer to dump gcc and use clang

#55
post #10

you're saying I should port all my code just because the ui is more user-friendly? what about performance, options, special warnings, builtins, and everything else? I've been using gcc for a while now, and every time I use it I found a new feature. It's rock solid and had never let me down.

Seriously? How can a comment this misguided be upvoted so high?

Re: How to convince any C developer to dump gcc and use clang

#56
post #12
post #5

Earlier quoted context omitted.

Proprietary extensions are one reason that gcc is so hard to unseat. You're always better off writing standard code if you want it to work in ten years.

Hardly proprietary. Apple gave the "block" patches to the gcc team. Gcc isn't interested in them, they are holding off for some future C++ syntax, though I don't see how that helps C programmers. Meanwhile, I got seduced by gcc's nested functions which are not supported by clang. Apparently they are non-trivial in clang so won't appear soon if at all. Two incompatible mechanisms for function decomposition are annoyin…

"Gcc isn't interested in them, they are holding off for some future C++ syntax, though I don't see how that helps C programmers."

You are assuming that C programmers need to be helped.

The beauty of C lies in its simplicity, not in its features. That's what has kept C alive to this day despite its shortcomings, and despite the existence of C++.

C does not need new constructs. C needs to be kept as simple and as close as possible to the hardware, it needs to continue to be a high-level assembly. That's what C is mostly used for.

If you feel C needs more features, you are probably using the wrong language for the job.

Re: How to convince any C developer to dump gcc and use clang

#57
post #51

I think for many large projects (> 100k lines of code at least, I guess) compilation speed can be critical. GCC is not perfect, but works well enough, is stable enough, that to switch without a strong argument is going to be a slow process at best.

Clang is supposed to be faster than gcc.

Re: How to convince any C developer to dump gcc and use clang

#58
post #11
post #2

Part of being a C developer (or C++ template) developer is in fact understanding what the compiler spits out. So, this did't convine me enough because "two or more data types" made me skip right a head to the definition of Point. :-) My point is Clang is good but friendly error messages is not the only reason I would change to Clang.

But it is a compelling reason. Imagine all of the brain cells you can reclaim by forfeiting that C++ error message intuition that you now have. First we need full C++ coverage in clang. Onward!

> Imagine all of the brain cells you can reclaim by forfeiting that C++ intuition that you now have.

Orders of magnitute more than just for the error messages.

Re: How to convince any C developer to dump gcc and use clang

#59
It's intuitive and shows new-world thinking. Most gcc developers are too old to care about doing such enhancements to gcc. They wouldn't change it just for the sake of status quo. As of 2010 we do need stuff like this, though gcc still has enough many traits not to switch to another compiler.
Post reply on HN