News for hackers. Stuff that matters.
Re:The Adoption of Rust in Business by carlmr on Tuesday February 07, 2023 @07:17AM (#34691759)
As a C++ dev that is very Rust enthusiastic. Rust is quite easy to learn if you have a decent grasp of C++.

The biggest thing you need to unlearn is the paranoia.

Re:The Adoption of Rust in Business by pclmulqdq on Tuesday February 07, 2023 @07:40AM (#34691952)
And that most things you used to do with pointers (linked lists, graphs, etc.) need to be done with something else.
Re:The Adoption of Rust in Business by pkolaczk on Tuesday February 07, 2023 @09:35AM (#34693250)
Typically those things would be enclosed in libraries providing safe and convenient APIs. Sometimes you might need to use a bit of Rc<RefCell> here and there. At worst, you are not any worse than in C++: use unsafe.
Re:The Adoption of Rust in Business by pclmulqdq on Tuesday February 07, 2023 @10:15AM (#34693839)
If I had $1 for every time someone told me that Rust had a "safe and convenient" API to do something that I wanted to do which didn't actually do the thing correctly or conveniently, I would have a lot of money. This line really needs to be dropped from the Rust sales pitch.

If I did it myself in another language which also has a ton of libraries (eg C++, Java, Go, etc.), there is no reason why I would want to reach for a library for that piece of code in Rust. There's usually a good reason why I didn't use a library.

Re:The Adoption of Rust in Business by adgjlsfhk1 on Tuesday February 07, 2023 @01:32PM (#34696924)
in c++ often the reason is just that c++ dependency management sucks
Re:The Adoption of Rust in Business by pclmulqdq on Tuesday February 07, 2023 @02:52PM (#34698410)
I actually don't find that to be the case, since most of the things you need are in one of the mega-libraries from Google or Facebook and the alternatives are often easy-to-find github repos.

The convenience of npm and cargo is offset by the fact that the documentation for most libraries is nonexistent, the creators inject their idiosyncrasies, and lots of library code has not actually been tested very well. Not to mention that the dependencies can change for the worse underneath you, and if you want the old features you had, you have to give up all new developments.

Re:The Adoption of Rust in Business by ReflectedImage on Tuesday February 07, 2023 @05:53PM (#34701050)
You are not suppose to spamming Rc<RefCell> :p

It's called Single Ownership.

Re:The Adoption of Rust in Business by pjmlp on Tuesday February 07, 2023 @08:07AM (#34692214)
Regarding paranoia, it will go well if the C++ developer is coming from "security matters", instead of "turn performance to 11" mindset.
Re:The Adoption of Rust in Business by jokethrowaway on Tuesday February 07, 2023 @11:33AM (#34694903)
That paranoia is healthy, it gets you thinking about memory and efficiency.

You can be inefficient with Rust as well.

The good thing is that you're less likely to get a null pointer or other silly mistakes / security incidents waiting to happen.