Reasons why Rust is Better than C++

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
RustIsBetterThanCPP
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 6
Joined: Tue Feb 07, 2023 9:29 pm
Current Project: Terminal Emulator in Rust
Favorite Gaming Platforms: Nintendo Wii
Programming Language of Choice: Rust
Contact:

Reasons why Rust is Better than C++

Post 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++.
User avatar
RustIsBetterThanCPP
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 6
Joined: Tue Feb 07, 2023 9:29 pm
Current Project: Terminal Emulator in Rust
Favorite Gaming Platforms: Nintendo Wii
Programming Language of Choice: Rust
Contact:

Re: Reasons why Rust is Better than C++

Post 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? ;)
User avatar
RustIsBetterThanCPP
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 6
Joined: Tue Feb 07, 2023 9:29 pm
Current Project: Terminal Emulator in Rust
Favorite Gaming Platforms: Nintendo Wii
Programming Language of Choice: Rust
Contact:

Re: Reasons why Rust is Better than C++

Post 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
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Reasons why Rust is Better than C++

Post by eatcomics »

Uh, sweaty, this is a rust forum, you don't have to tell us :mrgreen:
Image
User avatar
wtetzner
Chaos Rift Regular
Chaos Rift Regular
Posts: 159
Joined: Wed Feb 18, 2009 6:43 pm
Current Project: waterbear, GBA game + editor
Favorite Gaming Platforms: Game Boy Advance
Programming Language of Choice: OCaml
Location: TX
Contact:

Re: Reasons why Rust is Better than C++

Post 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.
The novice realizes that the difference between code and data is trivial. The expert realizes that all code is data. And the true master realizes that all data is code.
|darc|
Dreamcast Developer
Dreamcast Developer
Posts: 2
Joined: Thu Jul 17, 2014 4:41 pm

Re: Reasons why Rust is Better than C++

Post by |darc| »

All of the above is true.
ToyGang
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 2
Joined: Wed Feb 08, 2023 11:19 pm

Re: Reasons why Rust is Better than C++

Post by ToyGang »

Where is toy and C+?
User avatar
RustIsBetterThanCPP
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 6
Joined: Tue Feb 07, 2023 9:29 pm
Current Project: Terminal Emulator in Rust
Favorite Gaming Platforms: Nintendo Wii
Programming Language of Choice: Rust
Contact:

Re: Reasons why Rust is Better than C++

Post 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 22049 times
User avatar
RustIsBetterThanCPP
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 6
Joined: Tue Feb 07, 2023 9:29 pm
Current Project: Terminal Emulator in Rust
Favorite Gaming Platforms: Nintendo Wii
Programming Language of Choice: Rust
Contact:

Re: Reasons why Rust is Better than C++

Post 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.
Post Reply