Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

RUST language

Name: Anonymous 2014-04-29 4:40

I've been working C++ professionally for a couple of years and honestly I'm a huge fan - So I was excited to read about an alternative. After reading your 5 posts, I get the impression that RUST is mostly mildly useful syntactic sugar on top of C++.
Here is my feedback:
1 - If memory management is a serious problem for the software you work on, I've never found the boost library lacking. This seems like the main selling point for RUST. Given the scope of the project: you guys must be doing something that is so different that it couldn't be rolled into a library - so I'm looking forward to your future posts to see if there is something here that I really am missing out on.
2 - I'm not a fan of the implicitness and I personally don't use 'auto' b/c it makes scanning code harder. I guess this is more of a personal preference.
3 - A lot of things are renamed. auto->let, new->box, switch->box You get the feeling that effort was put in to make the language explicitly look different from C++
4 - the Rust switch statement don't fall through... This one was truly mind blowing. The one useful feature of switch statement got ripped it out! If you don't really need the fall through, I'd just avoid using them completely...
5 - I've never really seen an equivalent to boost (in combination to the STL) in other languages (maybe I didn't look hard enough). Could you maybe make a post about the RUST standard library? Libraries are always the deal breaker
To that point, my last comment is maybe a little more wishy washy. The main reason I'm consistently happy with using C++ (and why I put up with the header files) is that everything is available. If you need to do X, and X has at some point been put into library by someone: you can be sure that that library will be available in C++. Since Rust seems so close to C++, does this mean that linking to C++ code is trivial? If I can seamlessly start programming parts of our codebase in RUST, that could potentially make a huge impact.

Name: Anonymous 2014-04-29 7:45

>>1
Your post shows that you don't know Rust at all. I suspect you might even be trolling, but I answer anyway.

I think the most important thing in Rust is that it makes sure your memory usage is safe through ownership and borrowing system. C++ compiler can't really make sure things are safe but Rust copmiler can. It catches many mistakes that could be made by professional C++ programmer. For example, you can't accidentally dereference null pointer (would cause crash in C++ program), you can't point to memory location that can't be determined to be correct.

As of your stupid list:
1. Sure boost has unique_ptr, and shared_ptr and stuff (those are already on C++11 std lib, why aren't you using that??). Rust has similar versions of those, except that the compiler makes sure you don't use them incorrectly. Also, the syntax is nicer (your point about syntatic sugar, yes. I still think syntatic sugar is important). Most importantly, the Rust equivalents ensure safety. You can borrow ~ pointer (like std::unique_ptr) to & pointer, but you must write it so that & pointer must go out of scope before your ~ pointer. C++ can't ensure such thing.
2. You don't use auto? Even not for very long iterator types? Your code must look terrible.
3. let is completely different than auto, new is completely different than box. So maybe that's why they are named different?
4. Switch statement that falls through is cause of many bugs. I'm not sure why you defend it. Sure it's useful sometimes, and it might be nice to allow it with some explicit notation, but I think in no way is it better to automatically fall through if you happen to forget break.
5. I think C++ <algorithm> is very nice and works nicely with the rest of STL. There is in rust some iterator traits, that provide map, filter, chain, etc methods that provide similar thing than for example <algorithm>. But I'm far more exprerienced with C++ STL than these Rust traits, and I'm not sure I can tell if they are better or not.

The main reason I'm consistently happy with using C++
So does that mean that you will never search for better alternatives? That would make you terrible developer.

some point been put into library by someone
That's about the only thing where C++ is better than Rust. Though libraries are very important, so that might be enough for most C++ programmers.

As far as I understand, you CAN'T use C++ libraries in Rust. You can use C libraries, so if you have C++ library, you'd have to make C-wrapper to it first. Not very nice.

But as a language, Rust is MUCH better.

Name: Anonymous 2014-04-29 10:35

>>2
What is your opinion on Cyclone?

http://cyclone.thelanguage.org/

Name: Anonymous 2014-04-29 10:41

Name: Anonymous 2014-04-29 10:43

You copied this straight from an HN thread.

Name: Anonymous 2014-04-29 10:49

>>5
How do you know this? Do you browse Hacker Jews? Terrible!

Name: Anonymous 2014-04-29 10:58

>>6
not >>5-kun but, every time I see a post with more than 3 lines without bbcode I presume it's copypasta, so I search it on google first.

Name: Anonymous 2014-04-29 11:20

>>4
>>4
>>4
>>4
this so much this
fuck rust
fuck C++
why does this shit keep being created

Name: Anonymous 2014-04-29 12:48

>>8
optimise your quotes please

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List