What's up Sup Forums?

What's up Sup Forums?

C++/Python ape here...

Can you tell me something good about Rust lang?
Is it some kind C++ for pussies?

Please tell me more. Is it worth even trying?

Other urls found in this thread:

app.pluralsight.com/library/courses/ada-2012-introduction/table-of-contents
github.com/redox-os/redox
github.com/BurntSushi/ripgrep
diesel.rs
github.com/servo/servo
twitter.com/NSFWRedditGif

Nah its not. It's another language meme that is only taken seriously by brainless that think safety is having a managed language and not a discipline.

>managed language
This is how everyone knows you don't know what you're talking about.
Best thing to do is to try it for yourself.
The best way I've thought about it is that C and Ada had a baby. It's got relatively C syntax (but a lot added, it's not a small grammar) and Ada style compile time safety checks.

Just another meme muh C++ killer language that will be dead and forgotten in a couple of years because of lack of real world use

>managed language
>talking out your ass
I hope you don't embarrass yourself like this in real life, user.

duno but it gives me better sensations than go.
They made this language to increase the performance and reduce bugs in a critical software intended for massive use, the fact that they use it for firefox should tell you that they are serious about it, not like the other languages from google that not even they them self use.
Lets see on 56+ firefox how it performs and see if they evade exploits.

the syntax is really weird. apparently larger projects become insanely complex because of the memory model. but it's """"safe"". no i would not say it's C++ for pussies.

I really wish Ada had more community usage, it does more for bug prevention and is actually used in safety critical devices.

It's OK. Has some nice ideas. Unfortunately ugly syntax.

The syntax isn't as ugly as C++ tho.

It's basically all the good parts from C++ combined with some elements of Haskell, plus really innovative approach to memory safety based on relatively recent advancements from PLT, which allows it to be memory- and thread-safe without using anything like GC, thus keeping the performance very close to C. In the age where most PLs repeat the same old shit over and over with different sugar (or even go back, like Go did), Rust brings something actually new, and it works great.

>I really wish Ada had more community usage, it does more for bug prevention and is actually used in safety critical devices.
Ada is a very well proven language and can handle any project. The reason it was never adopted is that it was never taught in universities and there were no affordable compilers available for public use till recently. There are still no good beginners books for learning Ada, there is this course though which is really good:
app.pluralsight.com/library/courses/ada-2012-introduction/table-of-contents

>It's got relatively C syntax
It changes random things around just for the sake of being different.
>let instead of auto
>isize instead of int
>() instead of void
>trait instead of template
This is the future SJWs wanted, and now they've got it.

>let instead of auto
>isize instead of int
>() instead of void
>trait instead of template
It's almost like you have no idea what you're talking about.

>Rust
Over complicated abstractions upon abstractions, you think C++ has long compile times, Rust is even worse.
It takes away you freedom to do what you want how you want, while telling you you have that freedom.
It's almost like the language follows the ideology of the people who made it.

>() instead void
void isn't even a proper type, () is.
vector doesn't work, Vec does.

please show a concrete evidence to your claim

gross

MATLAB is only not a monkey-tier language.

I believe joogle said they use both Go and Dart internally.

Also, sjwzilla said they're replacing C incrementally in their code base so FF is still going to be almost entirely C for a while yet.

This. Initially Rust seemed like a breath of fresh air compared to C but then they added a bunch of macro shit and special compiler directives on top of it and now it's harder to read.

Still, I really like what they're doing with Crates. C and C++ should have had that shit many years ago.

The point about compile times is a real concern, but everything else you wrote is bullshit.

>want to allocate a bloc of memory
>unsafe fn alloc
>(((This is a nightly-only experimental API)))
freedom

>
Do you realize that you have the eye of sauron as a type declaration in your language?

>Can you tell me something good about Rust lang?
Some people really like cargo

>Is it some kind C++ for pussies?
I hear that getting memory management right with rust is quite difficult but C++ is just self inflicted harm so, some people will definitely say that it's for pussies.

literally a meme language

Vec is useless and you'll never see () in type declaration.
>want to allocate a block of memory
let block_of_memory = Box::new(42);
>mfw allocated 32 bit integer
Getting memory management right is equal to getting your code to compile. It is not hard if you know what you're doing and understand the ownership concept.
You're a meme.

visualrust is broken as fuck. Good luck getting step through debugging.

Rust tries to be C++, if it was invented today, but with a special emphasis on compile-time checking and type system sophistication.

In my opinion, it mostly succeeds at this.

You can write an OS in it: github.com/redox-os/redox

Extremely performance-competitive tools have been written in it: github.com/BurntSushi/ripgrep

A high-performance SQL query builder that introduces additional compile-time guarantees by leveraging Rust's type system, while maintaining an easy-to-use API: diesel.rs

And, of course, Rust's flagship project is Servo, a very promising browser engine: github.com/servo/servo

This kind of stuff is C++'s bread and butter. Regardless of the language's issues, there's no question that it is a suitable C++ alternative in many cases.

And, as someone who writes C++ every day for work, I often find myself wishing for Rust features. Particularly expression-oriented syntax (I'm thankful for the ternary operator every day in C++), proper algebraic types (tagged unions awkward in C++), pattern matching / destructuring, and constructors being plain old functions.

It's got bad compile times and an immature library ecosystem. The syntax isn't great; for a language that tried to avoid C++'s mistakes, they should have invested more effort into this before 1.0. They've been able to improve some things ("where" syntax for generics, for instance), but there are some particularly unfortunate choices that'll likely be around forever now, since they also don't seem particularly fond of the "gofix" approach to stability, which was extremely successful during the language's infancy. There's also a steep learning curve, and sometimes it's annoying to try to prove to the compiler that what you're doing is correct. But sometimes what you're doing isn't actually correct, and the compiler tells you, which is as satisfying as unit tests you didn't have to write.

No use-after-free, double-free, buffer overrun, buffer overflow, dangling references or leaks unless you use unsafe {}. Extremely powerful because of its high-level construct. Fantastic error handling without the exception meme.