Live data from Hacker News

It's time to halt starting any new projects in C/C++

twitter.com

631–640 of 929 posts

Re: It's time to halt starting any new projects in C/C++

#631
post #625

Earlier quoted context omitted.

You cut out the words “statistically speaking”, which entirely change the meaning.

In what way does it change the meaning? As I read it, "statistically speaking" is just being used as a parenthetical phrase to qualify that they're not trying to argue literally every rust programmer is superior to literally every c++ programmer, and can be safely omitted so long as no one tries to make some dumb argument like "well I've met one bad rust programmer before" or "so and so is a great programmer and they…

> so and so is a great programmer and they choose c++

Am I crazy? Isn’t that literally exactly what the person I’m responding to was arguing with respect to Carmack?

Re: It's time to halt starting any new projects in C/C++

#632
How good is rust at using existing C/C++ libraries? There’s so many of them for very useful low-level functionality, especially when programming against the Win32 API (which is written in C/C++ itself). Could I write a Windows kernel driver in rust?

I also can’t ignore the fact that Mozilla has been in serious decline as an organization in recent years. I worry about rust’s long-term trajectory as their support of the language wanes. It’s one of the reasons I feel so positive about the future of go, as they have a lot of dedicated people on it from google (an organization that in all likelihood won’t be going anywhere anytime soon).

Re: It's time to halt starting any new projects in C/C++

#633
post #578

I'm just a programmer who's been doing this for 20 years. I don't have the credentials of Mark, who is a legend. But I fully agree with him. There will be specific exceptions, but if you have the choice between Rust and C++ you would be making a big mistake to not choose Rust. The language is simpler, cleaner, safer, and more enjoyable to work with. The build tools are far more pleasant. The IDE experience is compara…

> The language is simpler, cleaner, safer, and more enjoyable to work with. I was a Rust v1 contributor. I have great hopes for the language as a replacement for c in systems engineering. However, I much prefer C++ 20 for the kind of work I do (scientific computing). Rust isn't a competitor to C++ in that arena, in my humble opinion. > Programmers currently using Rust are superior to programmers using C++, statistica…

Very interesting. I am working on something that I hope will also appeal to people doing scientific computing. Could you say a few words about why you prefer C++20 over Rust for scientific computing?

Re: It's time to halt starting any new projects in C/C++

#634

How good is rust at using existing C/C++ libraries? There’s so many of them for very useful low-level functionality, especially when programming against the Win32 API (which is written in C/C++ itself). Could I write a Windows kernel driver in rust? I also can’t ignore the fact that Mozilla has been in serious decline as an organization in recent years. I worry about rust’s long-term trajectory as their support of th…

Rust has very strong backing at Meta, Microsoft, Google, AWS and others. I wouldn't worry about corporate backing.

You can call into the Windows APIs (there's a windows crate) and if you want to call into something that isn't there, `cbindgen` and friends are amazing.

Re: It's time to halt starting any new projects in C/C++

#635
post #555
post #474

Earlier quoted context omitted.

That's a bold claim (since both languages are Turing complete). I presume you meant safe Rust? But that's kinda the point. If something is memory tricky it is supposed to go into unsafe so you can make a safe abstraction around it. Unless you meant actually all of Rust. In that case, please share what's inexpressible in Rust.

No. I mean that there is a great deal C++ can capture and present in a library that cannot be expressed in Rust. Much of this will never be in Rust because of this or that early choice of direction. At the most basic level, in Rust you cannot overload operators. You have no opportunity at all to code a move constructor. I could list off others all day long, but you probably would not understand most. Then there are t…

> At the most basic level, in Rust you cannot overload operators.

I've heard this claim multiple places and I don't really understand it. Operators have corresponding traits that you can pretty easily define for your types.

https://doc.rust-lang.org/std/ops/index.html#traits

Re: It's time to halt starting any new projects in C/C++

#636

Earlier quoted context omitted.

Ok, so I hate to be too direct but the rust enthusiasm always struck me as annoying like the meme about arch users telling everyone they use arch and so should you, but on that token, I always felt it strange given it's literally over something as mundane as a programming language choice. BUT, this as a reason seems to explain a lot more for why evangelists, particularly those in management type positions in large IT…

Surely you're joking, because I simply refuse to believe that you think Rust developers are actually sitting around thinking how to put other devs out of a job instead of, you know, using Rust simply because it's a better, more well designed language.

I didn't read it that way at all.

I read it as: where can we find a lower cost (than C++) pool of developers.

It's not particularly conspiratorial. Companies are always looking to expand their labor force and good C++ devs can be very expensive, so why would you want start a new project in C++? Security is another aspect altogether...

Re: It's time to halt starting any new projects in C/C++

#637

How good is rust at using existing C/C++ libraries? There’s so many of them for very useful low-level functionality, especially when programming against the Win32 API (which is written in C/C++ itself). Could I write a Windows kernel driver in rust? I also can’t ignore the fact that Mozilla has been in serious decline as an organization in recent years. I worry about rust’s long-term trajectory as their support of th…

> How good is rust at using existing C/C++ libraries? There’s so many of them for very useful low-level functionality, especially when programming against the Win32 API (which is written in C/C++ itself).

About as good as any other language with a C FFI (which is most of them).

> ... I worry about rust’s long-term trajectory as [Mozilla's] support of the language wanes.

I thought that was the whole point of having a Rust Foundation as separate from Mozilla itself.

Re: It's time to halt starting any new projects in C/C++

#638
post #286

Earlier quoted context omitted.

> If Rusties want Rust to displace C... simplify your dependency chains. Get a build system that's easily workable without an Internet connection and recent TLS support. Make it easy for beginners to build out Rust infrastructure for OpenVMS on Itanium, Solaris on SPARC, z/OS, MorphOS, GNU/Hurd, and a 20-year-old budget PDA running a custom OS on an SH4 CPU. C is welcome to that niche IMO. The priority is getting peo…

Most of those applications would probably be just fine with a GC language, so the cognitive load of doing things safely in any non-GC language is probably a waste.

Sure, but given that even today people still feel the need to write applications in non-GC languages for some godforsaken reason, it's good that Rust is there for them. Making a new language is easier than educating the developer population, sadly.

Re: It's time to halt starting any new projects in C/C++

#639

I’ll controversially go a step further and say we need to even begin requiring this via regulation for certain applications, at least for those that involve the personal or financial data of customers. From working with security at a large tech company, it’s abundantly clear that C/C++ should not ever be used for processing sensitive information (it’s fine to keep around for high performance computing or processing n…

In not sure we need to regulate for or against specific languages but we absolutely need to hold companies more accountable for their cybersecurity. Once meaningful fines for data leaks and compromises start raining down the market will quickly shift to safer technologies.

If society did care in any meaningful way, Equifax wouldn't be valuated more today than before the leaks, no?

Re: It's time to halt starting any new projects in C/C++

#640

I'm just a programmer who's been doing this for 20 years. I don't have the credentials of Mark, who is a legend. But I fully agree with him. There will be specific exceptions, but if you have the choice between Rust and C++ you would be making a big mistake to not choose Rust. The language is simpler, cleaner, safer, and more enjoyable to work with. The build tools are far more pleasant. The IDE experience is compara…

No post body was provided.
Post reply on HN