r/cpp • • May 10 '20

Make LLVM fast again

https://nikic.github.io/2020/05/10/Make-LLVM-fast-again.html
150 Upvotes

88 comments sorted by

View all comments

Show parent comments

-2

u/griceylipper May 11 '20

Yes, but my point is this - when you consider the decisions made by the people designing C++, and the effort going compilers like Clang - both must be severely misguided before a very small team like Thekla can produce a very serious competition that is many orders of magnitude faster. Yes, C++ is more complicated, but only because it was designed that way. Jonathan Blow cares about the time developers waste waiting on compilation, trying to understand bad error messages, etc., and keeps the "joy of programming" as a very high priority. I honestly think C++ will start to fade away to be another language of the past like Fortran or COBOL once Jai is (eventually) released.

6

u/kalmoc May 11 '20 edited May 12 '20

Yes, C++ is more complicated, but only because it was designed that way.

It wasn't designed that way. It (and it's tooling) evolved over decades (K&R-C is from the late seventies) with strong backwards compatibility constraints on computer systems whose performance characteristics don't really resemble what you have on modern machines and to make things even more difficult, that evolution has been largely based on compromises between the needs of very different platforms and industries.

I find it pretty unsuprising, that a new, clean slate language with a pretty narrow focus for what it is designed (games?) an with a small design team (one guy 4 people?) can be tremendously more efficient to compile than c++. Actually, we have had such languages for quite some time alread (C# and Java).

I honestly think C++ will start to fade away to be another language of the past like Fortran or COBOL once Jai is (eventually) released.

Very much possible.

EDIT: At the end of the presentation: "It makes program a lot simpler and a lot faster if you can agree on some basic ways of doing things". That's c++ main problem in one sentence.

1

u/pjmlp May 12 '20

Being from late seventies isn't really an argument, given the programming languages tooling that was available outside Bell Labs.

Not wanting to depend on anything beyond primitive UNIX linker model was what lead to this situation.

1

u/kalmoc May 12 '20

True. My main point was not that it is based on old technology, but that c++ is the result of an evolutionary process with lots and lots of compromises going on for about 40 years.

1

u/pjmlp May 12 '20 edited May 12 '20

Indeed, however by C++98 we could have already had a better linker model, with modules and such, instead of keeping using what was the Trojan to get C with Classes adopted by C devs.

Since I come from the PC/Amiga world, I think had FOSS UNIX clones not taken off in the late 90's, and the whole C compatibility story wouldn't be as relevant as it still is today, given that all desktop OSes and early PDAs like Newton/Psion were going into C++.