News for hackers. Stuff that matters.
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by zozbot234 on Wednesday March 31, 2021 @12:28PM (#26649271)
The issue is not "structs" v. "classes" per se, it's things like inheritance, vtables and RTTI (also other C++ features like templates and exceptions), that need special ABI support in C++ for which there is no Rust-side equivalent. (meanwhile Rust traits are quite different from anything in C++, although they're used similarly)
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by bluGill on Wednesday March 31, 2021 @01:40PM (#26650380)
None of those things are required for a class. I'll admit they are all useful at time, but all are abused.
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by kupiakos on Wednesday March 31, 2021 @08:47PM (#26655349)
It largely depends on the definition of "class" you're using. You'll raise some eyebrows calling structs that can't support implementation inheritance "classes".

You can also have implement different associated functions based on properties of generic arguments, which is quite different in design from just attaching methods to a struct.