Learning Rust

Why didn't you tell me it's such a comfy language?
Especially the Cargo build system is a Godsend.

I guess all the smart people at Mozilla are working on Rust and Servo(ignoring the community). Oh well, the language is solid.

Rust is p cool, good on you OP.

try haskell

Only if that shitlang stopped giving me errors about "unused return that must be used".

...

>Look MA! I used it again! Haha! Those people will never understand the true genius of my humor!

Wow, nice logo design. Have a you.
Now seriously, stop attention whoring this forever, you're like the nonfree.pizza guy.

The "return keyword is bad style" argument is retarded though. It may be useful in some cases, but it breaks readability. Have fun hunting expressions that don't have the semicolon to understand where the return statements are.
Like the language, it's growing on me, though.
Golang however, didn't stick to me, even though the channels and goroutines are cool, there's something about it that's just ... off.

This should be the Windows logo tho, people defending being screwed on purpose desu.

I like D better

Hello, Andrei Alexandrescu. Didn't know you were on 4chin.

>The "return keyword is bad style" argument is retarded
this

If the Rust shills stop, maybe the sensible people who use real languages can take a break.

Not standardized or used in production at all. Still a meme until these issues are sorted in 5+ years or more.

There is NOTHING comfy about rust...

Good choice though, it's a great language, just hope it actually takes off and replaces C. Not that it will, most people are too afraid and lazy to learn the language.

(Myself included)

>replaces C
This is a stupid meme. You still need C to write low level code.

Which is great if you start now. Think about your job security in the future. Also, Haskell.
Mark my words, someday Haskell is going to become a thing, and normies won't be able to learn it, because of Monads. Brace yourselves for even more blogposts about Monads.

>You still need C to write low level code.
Are you on something? C has never been necessary to write low-level code. Convenient, perhaps, but never necessary.

>You still need ASM* to write low level code.
FTFY

C is not low level.

Hasklel is 30 years old and only relevant in obscure academic circles.

C isn't as low-level as asm, but it's basically as low as you can get with a non-asm language, and there really aren't any valid competitors in that area.

Put the following at the very top of the source file:
#![allow(unused_must_use)]

Kek, you should give up on programming

If anything it will replace C++
>But it isn't OOP!
It doesn't need to be, OOP is a means of solving problems with mutability, Rust solves these problem without OOP, it does what C++ was created to do and it does it better. OOP is mostly a hindrance anyway.

This.
Rust will hopefully replace C++, but C will still live on.
C will always live on forever, it will never be replaced ever.

C and Rust complement each other, even though they hate each other.

unwrap it, bitch

We did tell you user-kun. All you had to do was listen and ignore the FUD. Enjoy.

There is rust.

D is 10x more comfy though

D has spoiled me so much I can't go back to C/C++ or learn Rust

>GC
Dropped before even picked up

>forced GC because they fucked up the stdlib
lol

That never happened to me and I've written at least 100k lines of Rust by now.

I don't see the point of forcing to use return when you're at the end of a block, it's natural for it to return the last value in the block. Then return is just used where it makes sense, for early returns.

This. It helps clear up, if just a bit, the control flow in a block.

It's one word per function, in 99.999% percent of the cases. What bloat could a simple "return" keyword add to your code? It's just laziness, not pragmatism.

The bloat becomes significant when you account for the fact that rust is a lot more powerful than, say, C, so you have actual lambdas, and you can use if's to conditionally yield a value for a single binding instead of using mutation, etc.

I don't actually care. The return keyword is not very necessary. Golang can predefine return variable and thus it doesn't have to return anything explicitly

Because you're thinking in terms of functions instead of blocks, and that's probably coming from C where blocks aren't expression.

fn foo() -> u32 {
let bar = { 42 };
bar
}

The first block yields 42, the function block yields bar. The return keyword is for early return from the function, which is not the same of a block returning the value of the last expression within. A function is defined with a block. There's no laziness involved in this, just proper design where most things are expressions as they should be instead of a weird mix of expressions and statements.

Doing god's work, user.

>Comfy

Because it forces clarity and readability.
Ruby has this same problem with implicit returns and it makes large codebases confusing as all hell.

It's a completely unnecessary thing to exclude and was probably done in the same of "NOW WE'RE DIFFERENT!"

Not an argument.
meanwhile,

This is why. Fuck off op.

Implicit returns in Ruby follow the same logic as in Rust, a block is an expression which returns its last expression. The return keyword is for early returns from a `Proc`.

ebic meem, but some people grew out of your phase

Because it's bad and it's creators are worse.

Have you considered re-writing this post in Rust?

[citation needed]