Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I've been using Rust for years and never seen undefined behaviour outside of unsafe blocks. How the hell did you manage that with a simple print?
Although I'd say Rust competes more with C++, people who prefer the C coding style would probably like Zig more. -
Rust doesn't have undefined behaviour nor any memory unsafety at all without using unsafe. Certainly a lone println!() shouldn't have any problems. Are you getting a deadlock because you .lock()'ed stdout?
-
@Parzi That's weird. What platform are you on?
It can't be a flushing problem because println auto flushes -
@Parzi print!() does not flush because stdout is line buffered like in many other languages. Use println!() or flush it manually.
"rust is great it's gonna kill C and C++ and all other low-level languages" i'm still hitting undefined behavior on printing a string to console and nothing else so i'm gonna say no as it's got the same issues C has
rant