Go Playground vs Rust Playground
package main import ( "fmt" ) func main() { fmt.Println("Hello, playground") } Go playground fn main() { let s1 = gives_ownership() let s2 = String::from("hello") let s2 = takes_and_gives_back(s2) println!("{} {}", s1, s2) // Here, s3 goes out of scope // moved, so no longer happens } fn gives_ownership() -> String let some_string = String::from("hello") some_string // takes and gives back with a let a_string = String::from("hello") a_string.push_str("huj") a_string // a_string is returned RUST PLAYGROUND
The meme contrasts the simple Go Playground example with the much more complicated Rust Playground code full of ownership, borrowing, lifetimes, and string-handling concepts. The punchline is that Go lets beginners print “Hello, playground” immediately, while Rust appears intimidating and overloaded with compiler-safety rules. It is sent as a humorous reaction to Rust’s reputation for having a steep learning curve. EN: The meme contrasts the simple Go Playground example with the much more complicated Rust Playground code full of ownership, borrowing, lifetimes, and string-handling concepts. The punchline is that Go lets beginners print “Hello, playground” immediately, while Rust appears intimidating and overloaded with compiler-safety rules. It is sent as a humorous reaction to Rust’s reputation for having a steep learning curve.
- @profunctor_io / 3315 2019-10-30
- Type
- image
- Size
- 487×800 · 77.9 KiB
- Mood
- sarcastic, nerdy
- Language
- en
- Added