Page 1 of 1

Reasons why Rust is Better than C++

Posted: Tue Feb 07, 2023 9:50 pm
by RustIsBetterThanCPP
Hi everybody,

I wanted to start a discussion why Rust is better than C++.

First, it has compiler enforced memory safety. You literally cannot have a segfault from an invalid memory access, either through incorrect pointer arithmetic, or whatever unsafe behavior C++ allows.

Second, it has better syntax. Rust is a new language with no baggage. C++ is literally 35 years old, based on a 40+ year old language, and the syntax shows. Have you even seen the syntax for the protoype of the signal() function? Even worse, C++, in its effort to be a modern language, has added an entire new set of syntax, which just makes it a siamese twin monstrosity. (For example, regular [type] name() declarations for functions, and the newfangled -> declarations for function return types.). :x

Also, C++oids literally think this is acceptable syntax:

Code: Select all

[](){}
Okay buddy. :roll:

Third, Rust has a cool mascot called Ferris. Ferris is a cool crab, which is a crustation, so we fondly refer to other Rust users as rustaceans. Get it? ;)

Fourth, C++ is just the unsafe language. The program can leak memory and crash, corrupt data, and let's not forget, get the sensitive data stolen.
Rust is the language that is safe and solves all those problems. Since Rust obsoletes everything before it, there is literally no reason to keep using C/C++.

Re: Reasons why Rust is Better than C++

Posted: Tue Feb 07, 2023 9:59 pm
by RustIsBetterThanCPP
As a slight follow up, I would also like to mention that Object Oriented Programming (commonly referred to as OOP) is an outdated paradigm.

C++oids typically criticize Rust for its lack of Object Oriented capabilities, lack of inheritance, etc.

However, have you LEGACY PROGRAMMERS ever thought that maybe your beloved OOP paradigm is actually and oudated circlejerk from the 70s, and it isn't included in rust by design? :roll:

Probably not, because you are too busy defining classes and incurring vtable penalties.

Yeah, C++ is sooooo fast.

How's that vtable indirection serving you? ;)

Re: Reasons why Rust is Better than C++

Posted: Tue Feb 07, 2023 10:04 pm
by RustIsBetterThanCPP
Programming Tier List:

S-TIER :)
Rust

A-TIER :|
Lisp, Fortran, Ruby

B-TIER :oops:
Java, C#, D (with garbage collection enabled), Ada, Python

C-TIER (UNSAFE TIER) :(
C, C++, Objective-C, Assembly Language, Perl

Re: Reasons why Rust is Better than C++

Posted: Wed Feb 08, 2023 9:58 am
by eatcomics
Uh, sweaty, this is a rust forum, you don't have to tell us :mrgreen:

Re: Reasons why Rust is Better than C++

Posted: Wed Feb 08, 2023 10:01 am
by wtetzner
RustIsBetterThanCPP wrote: Tue Feb 07, 2023 10:04 pm Programming Tier List:

S-TIER :)
Rust

A-TIER :|
Lisp, Fortran, Ruby

B-TIER :oops:
Java, C#, D (with garbage collection enabled), Ada, Python

C-TIER (UNSAFE TIER) :(
C, C++, Objective-C, Assembly Language, Perl
I believe this list is mistaken. All Lisps use S-expressions to represent code, and are all therefore S-TIER languages by default.

Re: Reasons why Rust is Better than C++

Posted: Wed Feb 08, 2023 12:33 pm
by |darc|
All of the above is true.

Re: Reasons why Rust is Better than C++

Posted: Wed Feb 08, 2023 11:46 pm
by ToyGang
Where is toy and C+?

Re: Reasons why Rust is Better than C++

Posted: Wed Feb 08, 2023 11:48 pm
by RustIsBetterThanCPP
ToyGang wrote: Wed Feb 08, 2023 11:46 pm Where is toy and C+?
C+ is C-tier for obvious reasons.

Toy is S-tier, standing for Segmentation Fault.
01185DF4-9378-4B84-83E0-E8AE72B6AC1B.jpeg
01185DF4-9378-4B84-83E0-E8AE72B6AC1B.jpeg (8.3 KiB) Viewed 16956 times

Re: Reasons why Rust is Better than C++

Posted: Wed Feb 08, 2023 11:56 pm
by RustIsBetterThanCPP
RustIsBetterThanCPP wrote: Wed Feb 08, 2023 11:48 pm
ToyGang wrote: Wed Feb 08, 2023 11:46 pm Where is toy and C+?
C+ is C-tier for obvious reasons.

Toy is S-tier, standing for Segmentation Fault.

01185DF4-9378-4B84-83E0-E8AE72B6AC1B.jpeg

I would like to amend this statement, by saying that the S-tier Toy resides in and the S-tier Rust resides in are in parallel planes. Toy is for Segmentation Fault Tier, Rust is for Safe Tier.