[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/RG/ Rust General Post rust stories, experiences, and problems

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 1

File: rust-logo-512x512.png (94KB, 512x512px) Image search: [Google]
rust-logo-512x512.png
94KB, 512x512px
/RG/ Rust General
Post rust stories, experiences, and problems
>>
>>61179796
>problems
Hey, I love Rust too. But Rust feels so... restrictive. I mean you cannot add perform i8 + i32! Neither can you do Option<i32> (Some<i32>)+ i32! This is intense! Of course, the result = explicit conversions everywhere which makes itself harder to read.

Then again stuff like 22/7 is allowed. I wonder why didn't it choose to be strict and prevent the truncation.

Also suppose you are doing some procedural/linear-imperative style programming.
let a = 15;
//...
let x = &a;
//...
let y = &a;
//...
//Now you want to change a
//damn I have to go back and change mut a. Fair enough, let's do it.
//Then you realize you may have to change the mutability of x and y accordingly
let x = &mut a; //definately out of the table -- Risk of data race or dangling pointer

I mean these are not bad practices but these make it hard for a new comer to get into Rust. Specially if you are coming from a very tolerant language like Python or D etc.

"Hello world".println!; //won't compile
For fuck's sake, what's the point of UFCS then :(
>>
>>61180027
All you need to do to is to wrap the borrow in a scope:

let a = 15;
{
let x = &a;
//....
let y = &a;
} // <- borrows end here
/// Now you can mut borrow
let x = &mut a;
>>
>>61179796
Last time I checked:

No SIMD
Removed ? : operator
No ++ and --

Is rust still retarded? I want to like it, but it feels like those python PEP-8 shills that enforce their preference on you and tell you to treat it like the law.
>>
I wanted to use Rust once
But it turned out it didn't have a basic "specify timeout in seconds" option with network requests in the standard library
People told me "well it's not ready yet" even though the language version was clearly 1.0
So I dropped Rust and never used it again since

this is my Rust story
>>
>>61183644
>? :
if let is more sophisticated actually
>>
>>61180027
>i can't write rust, i only know python
lmao, now you know why python is a bad teaching language
>>
>>61179796
>Rust problems
the fact that it exists
Thread posts: 8
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.