4 ms·
What exactly is the benefit of having multiple compilers? I'm not well versed in the area, but it seems like having one compiler is better from the perspectives
by ausbah 7y ago
What exactly is the benefit of having multiple compilers? I'm not well versed in the area, but it seems like having one compiler is better from the perspectives of standardization, having a single way of handling undefined behaviors, etc?
- smichel17 7y agoWith a permissive license, it's vulnerable to embrace, extend, extinguish.
- est31 7y agoThe ability to make it proprietary is in fact the reason why Apple didn't adopt gcc and became the main supporter of clang/llvm instead. So the issue is already here. Fortunately Apple's ambitions only center around keeping full control of the Apple walled garden (the apple main building is a wonderful symbol of it). And should a strong proprietary competitor outside of Apple's ecosystem emerge, people can always fork clang and put it under GPLv3 or similar.
- mitchty 7y agoIf that really were the case, why did Chris Lattner try to give clang/llvm over to the FSF and merge it into gcc? Which failed only apparently due to Stallman not noticing the emails. After which Apple started pushing clang/llvm as in a way, they were shunned by gcc. The rest of your comment is... way too political towards gpl.
- jcranmer 7y agoChris Lattner suggested it back when gcc was first working on LTO, and clang didn't exist. 2004 or 2005-ish, IIRC. Back then, he was still working at UIUC. Apple pushed clang as a competitor to gcc much later, closer to 2010-ish.
- mitchty 7y agoI'm curious then how the email from Chris in 2005 comes from his apple.com email address? https://gcc.gnu.org/ml/gcc/2005-11/msg00888.html https://gcc.gnu.org/ml/gcc/2005-11/msg00888.html Doesn't seem to add up with your proposed timeline. Care to explain?
- detaro 7y agoCompetition is a strong motivator to improve areas your implementation is bad at. E.g. with gcc/clang an often-mentioned example is error messages: They're not a benchmark you can optimize for, but turns out users really like helpful error messages and will start using a different compiler for them. Actual standardization (as in, there is a document describing the what's supposed to happen) is helped by multiple implementations because their conflicts will help discover unclear parts. This in return helps new implementations get of the ground if there's a need to produce them. Some standards groups require multiple independent implementation of something to exist before it is allowed to be released as a standard. Different implementations might be different enough that some changes are easier to make in one than the other. This makes it easier to test these changes, the other implementation(s) can then decide if the gains are worth their effort. It provides an out if one project resists changes for human/political reasons. I wouldn't be surprised if there's a few unusual architectures around that use Fortran but aren't handled by LLVM.
- eru 7y agoIf you rely on whatever the one true compiler does to undefined behaviour, you are essentially making the compiler the spec. That's workable, eg for Python (and in practice, Haskell). But is seen as less than ideal.