Live data from Hacker News

Ask HN: What is the state of C++ vs. Rust?

news.ycombinator.com

51–60 of 156 posts

Re: Ask HN: What is the state of C++ vs. Rust?

#51
post #31

Earlier quoted context omitted.

* can I get a good job programming in this? Without moving to another country or continent. Yes, there are many large companies which are either actively deploying Rust, or planning to. Easily found if you search. * is my industry showing interest in it? Yes: security, high reliability, availability and safety oriented industries. Any industry looking to get themselves out of the entrenchment of C/C++ but still needs…

Downvoted because no references to back up anything you are saying. I also tried doing a quick search on stackoverflow jobs and only got back 5 results [1]. [1] http://stackoverflow.com/jobs?sort=i&searchTerm=rust

The "Friends of Rust" page here lists organizations who have voluntarily chosen to advertise their production usage of Rust: https://www.rust-lang.org/en-US/friends.html

Furthermore, I attend Rust meetups all over the country and invariably meet people using Rust for various tasks at their job, even if their company doesn't choose to deliberately advertise itself as a Rust shop.

We also have a large internal list of contacts at companies using Rust (publicly or otherwise) that we use to schedule periodic conference calls to discuss the needs of production users in order to prioritize language development (e.g. Dropbox and Mozilla really, really want faster compile times, which is why that's been a determined focus for this cycle).

Overall we're quite encouraged by how many folks are willing to use Rust in a production capacity considering how young and unproven the language still is. :)

Re: Ask HN: What is the state of C++ vs. Rust?

#52
post #18

Wrong place to ask the question. HN has a high proportion of people with an unusual interest in trying out programming languages and I would say the average visitor doesn't particularly like C++. From my point of view, Rust doesn't offer any benefits that would justify a switch. I would lose a lot of experience, libraries, a mature stable platform and job opportunities in exchange for more memory safety - something t…

  > HN has a high proportion of people with an unusual 
  > interest in trying out programming languages
Which is precisely why it makes sense to ask this question here. :P

Re: Ask HN: What is the state of C++ vs. Rust?

#53
My favourite languages are from the Wirth and ML family of languages, so I really like Rust.

On my daily work I get to use JVM, .NET and C++.

Although my C++ usage is restricted to giving a little help to JVM or .NET applications, if at all required, which happens very seldom.

Here is where I still see Rust lacking, due to the language being young.

On those platforms the vendor's tooling supports mixed debugging, out of box integration with their platform libraries and a few other goodies.

For example, for UWP applications Rust tooling is still catching up with C++/CX and C++/WinRT.

Modern C++ does feel like a rejuvenated language, but the problem is that you require a team that is willing, or able, to force it across their code.

Otherwise you just get a mix of C++98, C++03, C++11, C++14, C++17, depending on which library you are looking at. Not to mention having to get your head around meta-programming tricks like SFINAE, as workaround for many of the C++17 features.

So although Modern C++ feels good, there is the question when one takes a C++ at random company X, how much they are allowed to actually use from it.

So I think a reboot into new systems programming languages is required, and Rust is one of the possible candidates.

Which will surely get its place.

Re: Ask HN: What is the state of C++ vs. Rust?

#54
Hope I don't get burned for saying it, but lack of real IDE support in rust is pretty annoying. With tools like racer you can still be productive, but things like rename refactoring or searching for uses of functions are things I miss most from languages like Java or go, which have good support.

There's been some talk for a long time of a rust oracle for code indexing (to support ide use), but there hasn't been much progress (or interest?).

Re: Ask HN: What is the state of C++ vs. Rust?

#55
post #18

Wrong place to ask the question. HN has a high proportion of people with an unusual interest in trying out programming languages and I would say the average visitor doesn't particularly like C++. From my point of view, Rust doesn't offer any benefits that would justify a switch. I would lose a lot of experience, libraries, a mature stable platform and job opportunities in exchange for more memory safety - something t…

Sorry but that's bullshit. C++ is just a dinosaur plagued with issues inherited by design decisions made before most of people here were born. Trying to replace it has nothing to do with looking for a perfect language. Rust could have absolutely 0 memory safety features over C++ and it would still be a massive improvement over the mess that is C++ package management and build systems with Cargo. Same is true for many…

That would be true if changing programming languages or adding new languages would be zero-cost. Then we could iterate fast to some close-to-ideal language.

This black and white thinking is just a sign of immaturity, not of knowledge of a deeper truth.

All mainstream languages are capable of delivering business value. I happen to prefer certain characteristics that led me to C++, but I also found Java to be quite fine. I don't think I'd mind doing PHP or even JS for an interesting project. I've done both in the past.

I'm not saying we should be completely dispassionate about our tools, it's normal to have likes (I do like C++). But hating languages is rather pathetic and unhealthy.

Re: Ask HN: What is the state of C++ vs. Rust?

#56
post #54

Hope I don't get burned for saying it, but lack of real IDE support in rust is pretty annoying. With tools like racer you can still be productive, but things like rename refactoring or searching for uses of functions are things I miss most from languages like Java or go, which have good support. There's been some talk for a long time of a rust oracle for code indexing (to support ide use), but there hasn't been much…

There was just a huge announcement yesterday: https://news.ycombinator.com/item?id=12739015

Re: Ask HN: What is the state of C++ vs. Rust?

#57
post #18

Wrong place to ask the question. HN has a high proportion of people with an unusual interest in trying out programming languages and I would say the average visitor doesn't particularly like C++. From my point of view, Rust doesn't offer any benefits that would justify a switch. I would lose a lot of experience, libraries, a mature stable platform and job opportunities in exchange for more memory safety - something t…

I don't think you can unequivocally dismiss Rust, we've seen Dropbox and other companies pick it up(just yesterday Facebook announced a Mercurial alternative written in Rust). As with each case, it depends. If you've got a well scoped project that is happy with a C ABI(or just stand alone exec) I think there's a compelling case for Rust. I'd also argue if you're looking for top candidates having Rust in-house could b…

I specifically said industry because projects come and go.

Yes, there are dozens of companies doing some project in Rust. That's true for almost any programming language.

I am guessing that it's going to be another 5-10 years until I would need to seriously consider learning Rust, assuming it will be able to break into the mainstream.

Safety-wise it could make sense for my industry, which seems to be overwhelmed by C and C++ (see Toyota).

Re: Ask HN: What is the state of C++ vs. Rust?

#58
post #52
post #18

Wrong place to ask the question. HN has a high proportion of people with an unusual interest in trying out programming languages and I would say the average visitor doesn't particularly like C++. From my point of view, Rust doesn't offer any benefits that would justify a switch. I would lose a lot of experience, libraries, a mature stable platform and job opportunities in exchange for more memory safety - something t…

> HN has a high proportion of people with an unusual > interest in trying out programming languages Which is precisely why it makes sense to ask this question here. :P

In that case one could save some time posting the question about non-mainstream language X and just learn X. End result would be the same. :)

Re: Ask HN: What is the state of C++ vs. Rust?

#59

Earlier quoted context omitted.

I've only used Rust lightly, but can someone explain what Cargo does differently from pip-tools? As far as I can tell, you have two files in both systems: One with the dependencies you'd ideally like to use, and one with the ones you actually used (and tested with). That way, you can update when convenient, but people who get your software have an exact known good environment. What makes Cargo that much better than p…

When people talk about `cargo` being awesome, they're comparing it to the similar tools for, say C++ or C or other systems programming languages. No one is comparing `cargo` to `pip-tools`.

First of all, I agree that cargo blows the C/C++ tools out of the water in terms of ease of use. But I think it's even easier than newer stuff too. It's by far the best dependency manager I've used.

I haven't used pip-tools, but I have used pip, npm, bower, and other more modern dependency mangers that work for non-systems programming languages. Cargo has never given me any trouble. Pip has occasionally given me weird issues about things not being installed in the right places or on my path. NPM regularly required `rm -r node_modules` and starting from scratch. Bower has had the same trouble as npm. It's not that these tools don't work for me, I've always been able to google the error message and find someone with the same problem. It's that Cargo has never given me an error message that wasn't my fault like "This package doesn't exist" when it's a typo. It just works.

Re: Ask HN: What is the state of C++ vs. Rust?

#60
post #30

Earlier quoted context omitted.

I have just a couple of points. First, please be careful with the "experts" broad brush. Not all, and possibly not most, experts will agree on many things. Moreover, actual experts will understand that there are pros and cons that are context dependent. I would hesitate to label as "expert" anybody who categorically prefers one over the other for all cases. That's more like zealotry than expertise. Second, for my par…

Most of Rust's guarantees are provided at compile time and have no overhead, just to be clear.

Yes most, but not all.
Post reply on HN