Live data from Hacker News

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

twitter.com

521–530 of 929 posts

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

#521
post #484

Earlier quoted context omitted.

There's nothing unsafe about integer indices because access to the array they index will incur bounds checks.

This means that you have array accesses that cause index out of bounds fatal errors instead of invalid pointer dereferencing that causes fatal segmentation failure errors. Detecting this kind of bugs reliably is a very good thing, but preventing such errors (and optimizing away bounds checking if possible) would be better.

Invalid pointer dereferencing isn't guaranteed to cause segfaults, you might just get garbage memory or nasal demons from LLVM handling undefined behavior. That's the key advantage of using integers (or a GC'd language) - it's memory safe.

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

#522

Earlier quoted context omitted.

The argument you are missing: Your position is bespoke and incompatible. You don't use idioms in your C code. You use idiolect. Thus, you exist in your own universe and are a party of one. And the clue was something you might not expect... I programmed C++ for five years, and C for over ten years before that. I don't know rust, but I followed this discussion with great interest. One of the topics that came up several…

It's not lost on me at all. I prefer to finish software. [1] I get it to where it needs to be and put it in maintenance mode. I don't accept outside contributions. [2] I prefer to work alone to keep the scope of my software manageable and to reduce communication overhead. And to avoid working with people. People are too complicated. I obsessively document my software. [3] I comment all of my code. I wrote design docu…

[deleted]

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

#523

Someone else downthread: "young developers can pick up Rust quite fast, and that makes it vastly easier than trying to find talented C/C++ developers." I hope so. I have a hypothesis that the big-O for language success is "How easily can new programmers learn it?" Nothing else matter. JavaScript was slow, but everyone learned it, so it got fast. Python still had bad tooling, but everyone learned it, so it got better.…

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…

I'd actually prefer a GCed language, but Rust gets so many of the other things right that its still better than anything I've seen before (despite forcing a borrow checker on me).

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

#524

Calling him the Azure CTO is strictly accurate, but HN readers probably know Mark Russinovich better as one of the primary developers of sysinternals[1]. I bring that up to highlight the weight of his opinion: Russinovich is legendary in terms of his systems programming contributions. [1]: https://en.wikipedia.org/wiki/Sysinternals

In the 90's before Mark Russinovich became part of Microsoft, he was doing interesting things like adding NTFS support to floppies (search "NTFSFLP")

Hat tip! Google found this: https://www.digiater.nl/openvms/decus/vmslt98a/nt/ntfsflp.ht...

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

#525
post #518
post #503

Earlier quoted context omitted.

With all due respect, this is coming from a Win32 API C programmer who happens to save the code in files with .cpp extension. In other words, not familiar with modern C++.

Modern C++ is a scam.

They have played us for absolute fools

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

#526

Blanket statements like this just show that people don’t understand why people stuck with a language. I worked in C/C++ for a long time, though it’s been a while now. I just went to look at whether Rust had any bindings for MPI. It does - rsmpi. But they’re not fully implemented, and only support a restricted subset of MPI implementations which are pretty much the latest versions. Some others might work, but it is no…

I agree. It's like when MS tell everyone just to "upgrade to dotnet 6" or 7 or whatever! Most of us don't have the funding, skills, time, priority to rewrite all of our old web forms apps even if we wanted to. Who is going to pay to rewrite the app that only earns us $10K a year? Even if we did decide that Rust is great, do we immediately expect our C++ senior devs to produce the same quality code in a language they…

>I agree. It's like when MS tell everyone just to "upgrade to dotnet 6" or 7 or whatever!

The amount of global manhours MS is throwing down the drain by constantly ending support for their versions must be absolutely staggering. Updates are often far from trivial, and they expect everyone to keep up with their fast upgrades and tiny support windows? Long term support is only 3 years, are you kidding me?

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

#527

Earlier quoted context omitted.

Cause those person-hours have to come from somewhere. Am I spending 2x of the new hire's time making them learn a harder language? Am I spending 2x of a senior's time teaching the new hire? What's the payoff in sticking with C++? Better libraries? Better tools? IDEs? That stuff will all shift as time goes on, if popularity is against it.

What's the equivalent in Rust to Eigen, Ceres Solver, OpenCV, JNI and Qt UI bindings? This is my standard stack for C++ and last time I checked Rust couldn't do any of them. This is also my standard stack for building new open source computer vision libraries, growing the available libraries and making my field more locked into C++, increasing the moat Rust would need to cross. Next step, can I compile and deploy for…

Deploying for Windows, macOS, Linux, iOS and Android is way easier with Rust than C(++), because there's one build system and one standard library that supports them all without #ifdefs. The ecosystem takes first-class Windows compatibility seriously instead of having a unix and windows dialects and the unix side saying MS sucks and it's your problem it doesn't compile.

The worst part about Rust's cross-platform compatibility and cross-compilation is Rust's dependence on a C linker and C/C++ dependencies if you choose to use them.

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

#528
I don’t disagree overall. We can do a lot better these days but Rust just doesn’t do it for me.

That language makes a train take a dirt road. It’s big, complex, and I have to believe “not what we are actually looking for”.

Haskell promised all kinds of safety too and has back doors to hide “unsafety” that are basically “game over”. Rust doesn’t seem to do much better in this regard. Maybe I’ve not written enough of it. (I’ve written far more Haskell)

How bad is GC really? Has Go shown it to be manageable and not an issue yet?

Seriously spending all my time in C and C++ due to the nature of my job, I can’t say I’m convinced we’d ever start using Rust.

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

#529

I don’t disagree overall. We can do a lot better these days but Rust just doesn’t do it for me. That language makes a train take a dirt road. It’s big, complex, and I have to believe “not what we are actually looking for”. Haskell promised all kinds of safety too and has back doors to hide “unsafety” that are basically “game over”. Rust doesn’t seem to do much better in this regard. Maybe I’ve not written enough of i…

For example why not Ada/Spark? People hate the Wirthian syntax?

I mean it’d be nice to be able to write M1/M2 Mac OS native Ada code but no one offers that it seems.

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

#530

Earlier quoted context omitted.

No one's talking about your personal project here. The audience is teams of people building software to be used in production.

Except that the tweet was pretty absolute. He could have had a reply tweet with something like "unless you have to or you're doing a hobby project." I took issue with the absolutism.

Those qualifications are going to hold for any advice about technology.

You can even justify using malbolge for your hobby project with "I like it" or "It's just for fun".

If your company is only going to pay you for producing malbolge code, then you write malbolge or quit. If you decide to stay, then trying to change their mind might be a good idea if you can spare the effort.

Post reply on HN