Hacker News new | past | comments | ask | show | jobs | submit login

Something I don’t quite understand, coming from a scripting-language bqckground: why are you using your OS’s provided compiler toolchain (for anything other than building OS packages for distribution?) Is there no version manager for clang the way there is for e.g. Rust?



Speaking about the classical C/C++ mainstream, and more from the Linux perspective:

Tooling for C and C++ mostly relies on some external package manager, often the OS-provided one (on most Linuxes, for example). There isn't a standard cpan/npm/pip/cargo for C/C++, although there are plenty of tools that can do kind of the same thing.

There's also not much support for virtual environments (there are tools out there, but not ubiquitous tools). It's pretty easy to point the compiler to a different set of header files and libraries, even on a per-file basis, to get a similar effect.

And from the Apple side (which I have a vague understanding of, having dipped my toes in a few times): Most of the documentation assumes that you're using XCode, and I'm pretty sure that the version of the compiler is just tied to whichever version of XCode you're using (which has a somewhat looser tie to the version of MacOS you're running). So in that case, you'd be using the XCode-provided toolchain rather than the OS-provided one.


You can install GCC from Homebrew if desired. Personally I don't bother because, well, Apple's clang works just fine!


> Is there no version manager for clang the way there is for e.g. Rust?

Not an official one for sure, Cargo is a blessing for people used to dealing with C/C++ dependency management.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: