fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

11K
active users

Today I'm going to give a talk on wrapping #cpp in #rust to a bunch of #cpp developers. Let's see how that goes...

@secana good luck. If they are as angry as me about all the unfair and false claims about C++ being an unsafe language where people compare the latest and greatest #rust compiler against a 10 year old C++ compiler, thereby ignoring all efforts made in fixing defects of the language, you are not going to have a good times. #cplusplus

Nonetheless we have to start to work together and find a middle ground where we honestly can discuss strengths and weaknesses of both systems.

@markuswerle @secana I see no (deprecation) warnings when I write memory unsafe code with "old C++" and compile it with the latest and greatest compiler (gcc /clang).
So even IF what you might refer to as "modern C++" is memory safe, let's please keep things objective and not redefine common terms like "C++" as being "modern C++ where you have to pay attention yourself that you don't use any of the old C++ constructs which are part of the official language because otherwise it is a skill issue".

@mo8it @secana First, memory safety is a rather small subset of code safety. People from the #Rust community seem to think they have the holy grail in their hands because they *may *have solved one minor aspect - if they adhere to certain rules like "do not use keyword unsafe", which is not easy if you are talking to metal directly.

@mo8it @secana Second, C++ is memory safe for +20 years. No one can claim they do not know how to have memory- and exception-safe code. This is **basic **knowledge. Do not blame the language for the fact that too many drunken lemurs lurk in the dark and cause damage to the world.

Lars Veldscholte 🇳🇱 🇪🇺

@markuswerle @mo8it @secana oh come on, that's ridiculous. Memory safety doesn't mean that it is possible to write safe code; that would be a useless definition, as all languages would be memory-safe by that definition.

Memory safety means that the language by design *guarantees* safety, i.e. that it is impossible to have UB and write unsafe code. C++ is definitely not memory-safe by that definition.

Rust is, and it is pretty unique in the sense that it has compile-time memory safety.