this post was submitted on 01 Jul 2024
173 points (93.9% liked)

Linux

5393 readers
417 users here now

A community for everything relating to the linux operating system

Also check out [email protected]

Original icon base courtesy of [email protected] and The GIMP

founded 1 year ago
MODERATORS
 

Video announcement by Chris Wanstrath (GitHub co-founder) of the 501(c) non-profit and $1,000,000 donation: https://www.youtube.com/watch?v=k9edTqPMX_k

you are viewing a single comment's thread
view the rest of the comments
[–] 7uWqKj 2 points 4 months ago (1 children)

I’ve seen C++ code written by Microsoft and I’ve got to say, they aren’t the brightest candles on the cake either.

[–] [email protected] 2 points 4 months ago

I've seen C++ code holding up a Fortune 500 company with people actually sitting on the board of C++ and being part of the decision making process on what goes into C++. Even had an advanced course on it given by some of the people. Let me tell you, it doesn't trickle down.

You can add all the macros and idioms you like, there will always be somebody loading an entire table from SQL into memory and dereferencing the each row+column with a double for-loop to find the correct row, then hand parsing the resulting row into the "right" in-memory data structure. Once you hit a column with variable length storing binary data (don't ask) and the length is in a column with that doesn't make it into the Row object, there is fun to be had.

My favorite is when you have a macro that hides what kind of pointer it is (shared, unique), but is only used when creating the variable, and someone uses a reinterpret_cast to solve some problem. Took a while to track that down. Bro, I fucking love the language.

Best of all is when code only has to pass some regression testing and has no code review. Absolute genius.

Anti Commercial-AI license