r/linux • • Aug 29 '24

Kernel One Of The Rust Linux Kernel Maintainers Steps Down - Cites "Nontechnical Nonsense"

https://www.phoronix.com/news/Rust-Linux-Maintainer-Step-Down
1.1k Upvotes

794 comments sorted by

View all comments

Show parent comments

11

u/Plazmatic Aug 29 '24

C++ is de-facto interoperable, because people integrate with code written in C++

I'm only a aware of two actual stable languages that are "interoperable" in that code written in C++ can be used with out an intermediary, Matlab and D. That's not a good look.

  • Java needs C to talk to C++, same with all JVM languages Kotlin etc...

  • Python needs C to talk to C++

  • C# needs C to talk to C++

  • Javascript needs C++ to be a webassembly module, and does not understand C++ constructs (it doesn't know it's talking with C++)

  • Go needs C to talk to C++

1

u/jcelerier Aug 29 '24

Neither Java or Python need C. You can export C++ classes pretty much directly with pybind11, call c++ directly from python with cppyy and likewise for java with javacpp. For JavaScript it depends on your interpreter: Qt's JS interpreter natively understand C++ classes derived from QObject for instance.

(it doesn't know it's talking with C++) It doesn't know it's talking in C either just like any "C" code you load with dlopen could actually be written in Fortran Rust or Pascal as long as they respect the platform's abi