fsloth 3 days ago

” killed C++ as an attractive modern language”

I’m not sure were you got this perception that it’s dead.

C++ remains the only game in town in many domains.

That said, _unless you work in those domains_ there is no good reason to use C++ IMHO.

Apart from the legacy codebases, there’s lots of C++ greenfield development.

” the ability to include C++ code and libraries from others ”

Libraries in vcpkg - a large number - are compatible enough to be used in this sense. It’s possible your specific domain is lacking contributions or you’ve been looking from the wrong places?

2
ghosty141 2 days ago

> I’m not sure were you got this perception that it’s dead. > C++ remains the only game in town in many domains.

Yeah but not because people like the language but because there is no alternative.

At work almost every one of us devs doesn't enjoy working with C++ but since many dependencies in the embedded space are written in C++ you don't have much of a saying which language you choose. For example, Qt supports basically only C++.

Rust is the only mature contender in that space currently.

MichaelZuo 3 days ago

Yeah, a ‘module’ based system of various language is so much less efficient that it seems absurd to compare them for anything that actually requires that performance.

torginus 3 days ago

Honestly not sure what you mean by that - in C#, for example it doesn't matter to the compiler where the code comes from, it can be JITed/inlined just the same even if its coming from a different dll.

I haven't seen any perf impact of splitting stuff between files/js modules in typescript either.

What I'm guessing is that you mean that static compilers, like that of C++, need to be able to 'see' large amounts of code to make clever inlining optimizations.

Which shouldn't be the case if the code is well designed, and/or the compiler can prove invariants necessary for optimization without having to look at the body of the code.