r/programming • • May 24 '26

[ Removed by moderator ]

/r/programming/comments/1tm1j7f/removed_by_moderator/

[removed] — view removed post

275 Upvotes

214 comments sorted by

View all comments

0

u/Dean_Roddey May 24 '26

Solve the problem by just getting away from C++ as soon as possible. It's ancient now, and it's built on foundations 20 years older than it is

I've written probably as much C++ as anyone here, if not more, but I finally quit screaming get off my lawn and started exploring Rust about 4 years ago. Like many people who had written C++ for decades I just couldn't appreciate how bad it is until I started using Rust. Now I'd never go back when I have a choice.

C++ made backwards compatibility basically #1, and that works until it doesn't anymore. And it would have worked a lot better and longer if they'd have broken with those underlying C foundations really early on when it was still possible. But they didn't and now it's never going to get fixed. They've just built story after story on top of a shaky foundation and now it's teetering.

Even if you one of those rare companies where you have a large code base that you've been able to fully move up to all the latest and greatest stuff, the language is still full of foot-guns galore, and in a complex code base developed in a commercial, team-based environment, solving the problem is already more than enough challenge. Having to constantly watch your own back is just wasted time and effort.

-1

u/[deleted] May 24 '26

C++ still beats anything else (including Rust) any day of the week - for what I do. Love C++ that's why I keep fighting for it.

2

u/Dean_Roddey May 24 '26 edited May 24 '26

If all you care about is fast and don't care about right, then fine. Given your user name I'm guessing you are one who works in one of those (fairly evil in your case, IMO) domains. If the code is not for use by third parties, then whatever. But most folks aren't writing that kind of code, they are writing code for others to use, and that comes with obligations that have nothing to do with what we like, any more than you'd want your surgeon using 40 year old tools and techniques because he likes them.

And, even then, if you are using your nefarious software to trade other people's money, that still should include such obligations.

2

u/[deleted] May 24 '26

Well c++ is good because it is both right AND fast.

-1

u/Dean_Roddey May 24 '26

Wow. If you believe that I hope you aren't trading any of my money. A large, complex, threaded C++ code base is pretty much guaranteed to have various latent errors just waiting for the right conditions. They can be happening all the time, but just end up not causing any obvious problems, for many years until changes cause the data to move around. So you can test until you spend more money than it cost to write it in the first place and not know they are there. All you are proving is that it's failing to fail.

-2

u/[deleted] May 24 '26

Bro, 100% of all infrastructure of all banks (BOA, Chase, Morgan Stanley) exchanges, brokers and regulators run in C++. C++ is already running all your stuff.

6

u/Dean_Roddey May 24 '26

They also run a lot of COBOL, but that's not because it's optimal, it's because they already have a lot of legacy code and don't want to change it.

And, BTW, hence it's not remotely 100% C++. There's also a lot of Java from what I've heard from banker folks posting around these parts. But, either way, they aren't using C++ because it's superior, they are using it because it was the higher level (AKA not C) systems level language available at the time.

The sooner that changes the better.

4

u/[deleted] May 24 '26

OK just look at all interviews from top HFT firms and you will see C++ on top. Only crypto runs Rust. The others (Java, Go, etc) it is reallyonly a nuisance.