3 ms·
> It's not really a language problem, it's a compiler problem This has never seemed like such a clear distinction to me. A language is essentially just an inst
by AmericanChopper 6y ago
> It's not really a language problem, it's a compiler problem
This has never seemed like such a clear distinction to me. A language is essentially just an instruction set for a compiler.
- NullPrefix 6y agoWell, there is a disctinction. It being a compiler problem, you can just accept the performance/size penalty and leave your code as is, but hope that in the future it will eventually change and the eventually really smart compiler will accept your current code as is and produce output without the penalty. Language problem would means you have to rewrite it differently.
- AmericanChopper 6y agoA language is both the abstractions that it implements, and the way it implements them. Any problem in the code you write could be solved by changing the compiler as much as it could be solved by changing the code. The two parts of the system are inseparable. I’d say a language can only be as good as its best compiler.
- somethingwitty1 6y agoBut they are quite different. There are languages that are tightly coupled, but not true of all (like Go). You could write all your applications in the Go Language, but use a transpiler. And as other comments call out, it is important to not conflate the two. A language issue is one that can't be easily fixed without breaking backwards compatibility. Compiler optimizations can be made (and is done all the time) without breaking the language.
- sli 6y agoConsider that a hobbyist C compiler isn't going to perform the same optimizations as gcc. Likewise, clang and gcc aren't totally equivalent, either, despite being based on the same language standard. Most languages don't have multiple compilers, but any non-commercial language can in theory have multiple competing compilers that don't give equivalent output for the same input.
- eru 6y agoEven commercial languages can have multiple competing compilers.