back to indexBjarne Stroustrup: C++ Implementations - Clang, GCC, Microsoft, and EDG
Chapters
0:0 Intro
0:30 Multiple implementations
1:0 Backend infrastructure
1:30 Compilers
2:30 Monoculture
3:0 Barriers
3:30 Competition
4:0 Conclusion
00:00:00.000 |
So is there differences in your view, not saying which is better or so on, but differences 00:00:13.820 |
Why are there several sort of maybe naive questions for me? 00:00:24.600 |
When I designed C++, most languages had multiple implementations. 00:00:33.840 |
Because if you run on IBM, if you run on a Sun, if you run on a Motorola, there was just 00:00:40.400 |
many, many companies and they each have their own compilation structure and their old compilers. 00:00:46.420 |
It was just fairly common that there was many of them. 00:00:50.260 |
And I wrote C front, assuming that other people would write compilers for C++ if I was successful. 00:00:58.840 |
And furthermore, I wanted to utilize all the backend infrastructures that were available. 00:01:06.320 |
I soon realized that my users were using 25 different linkers. 00:01:12.240 |
Yes, I could, but I couldn't write 25 linkers and also get any work done on the language. 00:01:21.060 |
And so it came from a world where there was many linkers, many optimizers, many compiler 00:01:28.400 |
front ends, not to start, but many operating systems. 00:01:35.080 |
The whole world was not an 86 and a Linux box or something, whatever is the standard 00:01:45.780 |
So basically I assumed there would be lots of compilers. 00:01:49.580 |
It was not a decision that there should be many compilers. 00:02:03.260 |
And today there's at least four front ends, Clang, GCC, Microsoft, and EDG. 00:02:16.420 |
They supply a lot of the independent organizations and the embedded systems industry. 00:02:27.140 |
We have to think about how many dozen backends there are because different machines have 00:02:34.020 |
different things, especially in the embedded world, the machines are very different. 00:02:42.340 |
And so having a single implementation was never an option. 00:02:55.660 |
They are dangerous because whoever owns the monoculture can go stale and there's no competition 00:03:07.140 |
There's a lot of incentive to put barriers in the way of change because, hey, we own 00:03:13.020 |
the world and it's a very comfortable world for us. 00:03:19.860 |
So I really am very happy that there's four front ends for C++. 00:03:26.940 |
Clang's great, but GCC was great, but then it got somewhat stale. 00:03:41.900 |
So at least a low number of front end puts a lot of pressure on standards compliance 00:03:53.100 |
and also on performance and error messages and compile time speed, all this good stuff 00:04:01.940 |
Do you think, crazy question, there might come along, do you hope there might come along 00:04:09.060 |
an implementation of C++ written, given all its history, written from scratch? 00:04:20.100 |
Well, Clang and the LLVM is more or less written from scratch. 00:04:31.780 |
I think sooner or later somebody is going to try again. 00:04:34.780 |
There has been attempts to write new C++ compilers and some of them has been used and some of