4 ms·
> Bjarne's made the mistake of having C++ rely on C's linker model, so it meant no modules. > Now we can see it as a big mistake, but on those days probably it
by ableal 9y ago
> Bjarne's made the mistake of having C++ rely on C's linker model, so it meant no modules.
> Now we can see it as a big mistake, but on those days probably it was one of the reasons why C++'s adoption took off.
No mistake, just no choice - the original (1986 or so) C++ cfront compiled C++ to C which it fed to the C compiler and linker chain.
- pjmlp 9y ago> "but on those days probably it was one of the reasons why C++'s adoption took off." It is a mistake with 2017 eyes, because build times are now insupportable. Of course it was the right decision in 1986 when trying to get adoption inside AT&T. Also I have read "Design and Evolution of C++" back when it was published, and know C++ since Turbo C++ 1.0 for MS-DOS, so I grew with the language. Which is also a reason why I still select it as member for my Java, .NET and C++ toolbox trio. However the first ANSI C++ was approved in 1998, and many of us were expecting to get some kind of module support in C++0x.
- Yttrill 9y agoModules would be very hard to make work in C++, there's way too much entanglement at all levels. Of course the rot actually started with the ANSI C committee when it introduced typedef and broke context free parsing. C++ just compounds this kind of problem with template lookup stupidity. Its what you get when languages are designed by people with no understanding of basic computer science.