Live data from Hacker News

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

fseek.me

31–40 of 97 posts

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

#32
According to the clang home page as of March 7th 2010, "Clang's C++ support is currently alpha quality at best, but is evolving rapidly."

Obviously, clang does not mean to attract C++ developers. For a while, I'd been adamant about developing in C and not C++. One day I discovered that I'd hand-coded a vtable in order to allow polymorphism in structures of function pointers. The next day, I halved the project complexity by writing 3 classes and changing a flag in the make configuration.

I use Gnu make through the Eclipse CDT on Ubuntu. It's a clunky and ugly toolchain/IDE combo that took days to configure. It compiles C, C++, CUDA and Brook+ in the same project across 3 different computers. A better C frontend would be nice, but I do not look forward to getting that working with everyone else in this chain.

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

#33
post #30

Earlier quoted context omitted.

I think he meant to say "non-standard".

Yes, nonstandard. I apologize for my sloppy wording. By all means play with closures. I don't mean to discourage the original poster from experimenting. I am just pointing out some irony in the context of gcc and clang. Clang is forced to implement nonstandard gcc extensions. I do not see this as a good thing for languages that are essential building blocks and which people have put a lot of work into standardizing.…

[deleted]

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

#34
post #30

Earlier quoted context omitted.

I think he meant to say "non-standard".

Yes, nonstandard. I apologize for my sloppy wording. By all means play with closures. I don't mean to discourage the original poster from experimenting. I am just pointing out some irony in the context of gcc and clang. Clang is forced to implement nonstandard gcc extensions. I do not see this as a good thing for languages that are essential building blocks and which people have put a lot of work into standardizing.…

[deleted]

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

#35
post #32

According to the clang home page as of March 7th 2010, "Clang's C++ support is currently alpha quality at best, but is evolving rapidly." Obviously, clang does not mean to attract C++ developers. For a while, I'd been adamant about developing in C and not C++. One day I discovered that I'd hand-coded a vtable in order to allow polymorphism in structures of function pointers. The next day, I halved the project complex…

[deleted]

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

#36
post #35
post #32

According to the clang home page as of March 7th 2010, "Clang's C++ support is currently alpha quality at best, but is evolving rapidly." Obviously, clang does not mean to attract C++ developers. For a while, I'd been adamant about developing in C and not C++. One day I discovered that I'd hand-coded a vtable in order to allow polymorphism in structures of function pointers. The next day, I halved the project complex…

[deleted]

What does it mean? I do not get your formula.

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

#37
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.

You shouldn't need to port your code; C is C, right? Or do you use a lot of gcc extensions?

Clang is compatible with the most used GCC extensions. See this: http://clang.llvm.org/features.html#gcccompat

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

#39
post #13

Since when is it hard to find and correct syntax errors that are preventing your C code from compiling?

That semicolon-omitted-after-struct error used to happen to me irregularly but frequently enough to really piss me off. It's annoying precisely because it's nonlocal and it interacts badly with the C preprocessor model.
Post reply on HN