Redpill me on rust

Redpill me on rust.

Attached: RustProgrammingLanguage_cover_0.png (473x625, 163K)

It's a decent language but is somewhat niche and won't be replacing C++ any time soon.

Retards will complain about "SJWs ruining it" but will conveniently ignore that this has nothing to do with the language itself and how productive you are able to be with it.

TRANNY KEK SJW SHIT KEK

its the new ruby. full of sjws trannies faggots all mental illnesses you can think

It's like modern c++, but somehow has worse syntax. Type traits are an interesting idea, but they're also going to be added to c++. Immutable by default is an interesting idea, but generally doesn't lend itself to high performance. A rust-like language is probably the future of programming that requires good performance, but that language is more likely modern c++ than it is rust.

Attached: 1546969759162.jpg (598x172, 66K)

I don't like the language or the community, but I love that kawaii crab.

just ignore any post with the keywords: "SJW", "CoC", "cuck", "you just need C" and any bullshit by those NEETs

this is sound advice in general

tranny sjw detected

>worse syntax
worse syntax how exactly? I really don't understand this argument if you are really coming from a c++ background, it's almost exactly the same fucking syntax, if you can easily read c/c++ you are at home with rust

I'm interested to learn some Rust, but everytime I actually look at any Rust code I want to puke.

it only gets ugly when you abuse closures

It's tainted by ESSJAYDoubleU!!!

janny btfo xD

Shittier C

Closures are fine:
let f = |x| 2 * x;

That's not an abuse of closures

i mean you can abuse closures in any language to make ugly code

it gets worse then you have
let somevar: Vec = vec![somefunc().unwrap()].into_iter().map(|x|
x + 1
// a bunch of more things
).rev().collect();

etc. I've seen this style plenty if times and it doesn't always end there, the more idiomatic someone is able to write their code the more they're likely to do this shit until the point where it becomes unreadable (to me)

that indent wasn't intentional, it got messed up after I posted it

delete it and repost it

make me

do it fag

brainlet detected
In some cases I find it to be pretty readable
e.g.
let numbers = env::args()
.map(|s| s.as_str().parse::())
.map(Result::ok)
.collect::();

I think this is pretty readable. This is similar to piping in functional languages, which is also pretty cool

and has equally bad performance as functional languages too

>passing a variable to a function moves it to the function scope
that's a yikes from me

Attached: 1531197031384.png (502x668, 351K)

Seems like a nice language, especially with the embedded bare-metal capabilities and many libraries
But the community seems more interested in political correctness than developing the language
Should I ignore it and use it?

>rust

Attached: 1547212837623.jpg (827x960, 40K)

try to the same thing in Go, this would take like 40 lines

Attached: 1300044776986.jpg (250x250, 10K)

Meanwhile, in Javascript,
let somevar = somefunc().map(x => x + 1).reverse()

I find js/typescript very comfy tbqh, but the Rust implementation isn't far, just the type inference thing that doesn't work in all cases makes it cumbersome to write but it is worth it for big new infrastructure projects compared to using c++

snibeti snab :DDD

It's a webshitter reimagining of C++

the most popular criticism against it is the association with sjws, the second is the syntax, the third is that go is easier, the fourth is that lifelong c++ streetshitters find it difficult to to learn
if you're an experienced c/c++ dev it's never going to be more than a sidegrade, a newer and modern sidegrade with all the conveniences and advantages of a modern language but with all the disadvantages of having to learn a new non-trivial language

>with all the conveniences and advantages of a modern language
Surely I can't be the only one who feels that lots of modern "conveniences and advantages" are just getting in the way? languages have added so much syntactic sugar that they've become disgusting, like soda.

It's a great language and the most loved one by programmers according to stackoverflow.
But it's a systems programming language, it has specific usecases. It's perfect for servers, system services, kernels, drivers, engines and stuff like that, but not for applications, games, web services etc.

It's just a language. No one cares about political correctness except Jow Forums and some supposed rust communities no one ever used here. You won't find any of these by just using the language, reading documentation, using github.

The equal Rust code is just;
let somevar = somefunc().iter().map(|x| x + 1).rev().collect();

Not bad, considering Rust is strongly typed and iterators are lazy and executed all at once, instead of creating new arrays every single time in JS.

Rust is not Go's rival, both languages are completely different and are used for different problems.
Go is managed, has GC, no bare-metal, requires runtime etc. Go is a Node's competition.

Attached: john-mccain-is-dead.png (473x625, 185K)

C++ people are just jealous because they know their language is a big clusterfuck and it's only going to get worse

>It's like modern c++, but somehow has worse syntax.
In what bizarro world do you live in where C++'s syntax isn't an objective mess? C++ is a very powerful language but from a language design and syntax standpoint it's the biggest clusterfuck ever invented.

Have you been oxygen deprived or something? He didn't say C++ has a good syntax. He said Rust has a WORSE syntax.

why does C++ have bullshit like std::transform instead of map?

But that's impossible. C++'s syntax is like 0 degrees kelvin, it can't get worse.

God I wish C++ was not a cluster fuck. No one seems to care much tho

>C++'s syntax is like 0 degrees kelvin, it can't get worse.
Have you seen Erlang?

why is that bad?

Is there a way to get around that without spamming clone?

Ownership goes back to the parent scope when the function ends

mutable or immutable references? if you're mutating a parameter and don't want that mutation to be applied to the caller you're probably doing something dumb - just introduce a new local variable

I prefer Rust over C++ for the following reasons:
>Language-enforced memory safety (sepples can probably be just as memory-safe but it requires discipline)
>Module system is simpler and easier to use than confusing header/source file split (especially with Rust 2018)
>A sane build system with a package manager.
>Proper macros so you can pretend it's Lisp.

The rust language itself offers nothing new and is poorly implemented. So what's left besides marketing wank and the community full of shills who harass everyone.

>full damage control
fuck off

where was a borrow checker implemented before rust?

References, smart pointers or Copy trait. Just because you don't write .clone() in C++, doesn't mean your code isn't full of implicit cloning and function calls. It's nice you are aware when your code does cloning, because you should avoid it as much as you can for anything larger than primitives/small structs.

Just like C++ that is always few years behind other popular languages when it comes to features.
Every language is just a set of well known paradigms with syntax sprinkled onto them, it's hard to find truly unique feature in a language.

Iterators have the save overhead as a for loop after a compiler optimization pass...

C++ crossed with functional programming.
consider yourself redbulled

What's so bad about Erlang?

jewish shit

>>Jow Forums

>>Jow Forums

>logic and reason is damage control
tell me where the tranny touched you user

It's a good language bad implemented

Debugger macro looks swish af

Basically you're late and missed the train, go back to C.

unironically zero cost abstractions

Has the actually useful features they slapped onto C++ without all the workarounds bullshit boilerplate stuff you deal with in C++. Also nice standard library.

Standard syntax:
>void foo(int bar)
Rust syntax
>fn foo(bar: int32) => void
It inexplicably changes fucking everything, mostly by making it backwards
There's no technical advantage it just wants to be special and different

> => void

Attached: 1545394394256.jpg (640x633, 41K)

I bet you only know python.

That is terrible Rust and wouldn’t compile for at least three reasons. This better be bait.

What's the difference between closures and labdas supposed to be?

a closure is a lambda with an execution context attached

anyone use D?

It's creator uses swift for daily programming. That's all you need to know.

>the only thing you need to know gives you no information whatsoever about the topic at hand
Why is the world so cruel?

yea

Attached: 1544409177373.png (636x773, 14K)

Found the tranny

>not for games
incorrect, there are plenty of games written in C / C++, in fact I'd even go to say it's one of the most popular languages for whipping up a high performance game in.

thanks for showing your mental retardedness

C/C++ is a popular language but it will always be inferior to C, and by extension, C++

the borrow checker is too restrictive

Attached: rustarded.png (861x359, 51K)

Wtf, Rust logo kind of looks like a black sun. How did the sjws get away with taking over Rust?

If the same guy made Rust and Swift why is Rust so ugly and Swift so pretty? Did Apple design the syntax for him and put a gun to his head in case he deviated?

Attached: 6B626581-FD67-466F-9BBA-B287E4DD562B.gif (1626x726, 78K)

he didn't start Swift, he was hired by Apple to continue development of Swift and borrow some philosophies from Rust

>two mutable ref pointing to the same data structure and sharing the same lifetime.
Witchcraft, Heresy and MUTATION!

The Compiler protect.
His Borrow Checker is my shield.
His Warning Messages my sword.
Suffer not the Pajheet to live.

*PURGE*

Rust and C++ are great for making a game engines, but not that good for making games itself. Of course you can do it, but usually you don't need that performance in mere game logic and using language like this might be counterproductive.

If you want multiple mutable references to different parts of a single slice so badly, you can just use one of split* functions.

based

Couldn't agree more.

Err... no. In Rust, it would be:
fn foo(bar: i32)

If you don't have a return type, you don't write one. It implicitly returns the unit type. Also, a 32-bit integer is i32, as opposed to int32_t in C (int is not guaranteed to be 32 bits).

its pointless, made by nodejs faggots. just learn c++

>Standard syntax:
>>void foo(int bar)
>Rust syntax
>>fn foo(bar: int32) => void
Fuck off, retarded faggot. C++11's trailing return type is a god's gift. Do more research before posting.

I used to be full on C++ autist. I would enable all the annoying pedantic warnings and shit, and run cppcheck and clang-analyzer for good measure. Then run a bunch of runtime sanitizers.

Then I discovered Rust, and I was like, wow, it's even stricter.

If you're that kind of submissive faggot who likes to be raped by automatic code analysis tools, consider giving Rust a try.

Otherwise, probably stick to C/C++.

Attached: majorbrainlet.jpg (219x250, 7K)

> new ruby

statically typed ruby

/thread

>logic and reason
none of those were in post I replied to. But I did use logic and reason to figire out why that tranny sucker wrote that.
Fuck off.

Attached: 1547334655034.png (1926x906, 188K)

Technically, statically typed Ruby actually exists, and it's called Crystal.

Rust is nothing like Ruby or Crystal, however.

>bawwwwww i'm being bullied by a man in drag please help me
no one cares, if this actually disturbs you from writing code then you don't deserve to be doing it

community matters alot. i dont like to socialize and get help from niggers, trannies, sjws, coc cucks and other mental illnesses. not interested in pushing a language with such community behind. literal ruby v2, fuck yourself fag

>unable to ask for help without being triggered by the identity of the person you're asking for help
let me repeat, you don't deserve to be writing code, consider cleaning toilets as that might be more your speed

you know c++ has this too right?