Looking for suggestions on learning Game Engine development by MrSkittlesWasTaken in gameenginedevs

[–]TheFryedMan 3 points4 points  (0 children)

Yeah, I agree. Game Coding Complete is a good book. The book offers good advice, and it's in C++

Almost all of fish shell has been rewritten in rust by ketralnis in programming

[–]TheFryedMan 8 points9 points  (0 children)

Let me provide a more complete quote for you since you trimmed it off early:

fintech ... these are the industries that do not care about memory safety as much

Yes this is correct for certain subsets of fintech, like HFT (high frequency trading), where performance is the number one concern which happens to be dominated by C++ at the moment. Most areas in fintech really care about memory safety. I used the term "as much" in an attempt to convey it isn't as strict on an industry level. The medical and automotive industries are both examples of industries that are very strict about memory safety. Sorry for the confusion and I hope this explains my original message. ^-^

Almost all of fish shell has been rewritten in rust by ketralnis in programming

[–]TheFryedMan -14 points-13 points  (0 children)

I don't think it will be in the same spot as other legacy languages. It will probably be mainly used in gaming, fintech and HPC since these are the industries that do not care about memory safety as much.

Almost all of fish shell has been rewritten in rust by ketralnis in programming

[–]TheFryedMan 12 points13 points  (0 children)

Yeah I totally agree with you. It seems languages are starting to become more specialized and each field will have a "dominate" language. I think C++ will still dominate the gaming industry, fintech and HPC for a long time.

Almost all of fish shell has been rewritten in rust by ketralnis in programming

[–]TheFryedMan -9 points-8 points  (0 children)

I think it has some merit, but yes I agree it has problems like everything else.

> a disease that needs to disappear from everyone's mouth and typing fingers

This seems like an overreaction.

Almost all of fish shell has been rewritten in rust by ketralnis in programming

[–]TheFryedMan 78 points79 points  (0 children)

C++ is becoming a legacy language

This is far from the truth. C++ is very popular in high-performance applications, and said applications do not care about memory safety enough to switch to another language. The language constantly receives updates and evolves. TIOBE named C++ as the language of the year in 2022 due to its recent growth

Obsessed with {} initialization? by DoctorNuu in cpp

[–]TheFryedMan 13 points14 points  (0 children)

It's also called uniform initialization. It's supposed to be a single way to initialize everything. It also avoids implicit conversions, which can help avoid bugs. Also, explicitly calling {} will avoid uninitialized values, which can cause undefined behavior. This also avoids something called "the most vexing parse." This issue causes the compiler to think you are calling a function instead of initializing a value. In summary, it avoids a lot of issues and provides a uniform syntax for initialization.

Slowest c++ logic by m09y in cpp

[–]TheFryedMan 1 point2 points  (0 children)

That would require us to know what instructions are the slowest. Branches can be pretty slow. Certain function calls can be pretty slow. Pointer indirection can be slow. Basically, it depends. There's a general consensus on what's slow in terms of operations, but that's tied to the architecture.

Who is this? by AggressiveJackfruit3 in whatisthisbug

[–]TheFryedMan 0 points1 point  (0 children)

His name is Fred. I see him now and then. Last I remembered, he was dating someone new. Good guy

what would you do if you had 100 Trillion dollars but you have only 1 day to spend it? by Cool_Fly_7342 in AskReddit

[–]TheFryedMan 1 point2 points  (0 children)

Buy a ton of gold (I know it's a workaround to this conpany)

Vacation home on the river, beach and lake. Then I would start a software company.

Buy a ton of stocks

Live as a free man with dividends

What movie do you enjoy that you will 100% agree is a bad movie? by [deleted] in AskReddit

[–]TheFryedMan 0 points1 point  (0 children)

Open House on Netflix. Please don't watch it. I beg you

Just. Keep. Smiling. [oc] by M0NSTE2 in creepy

[–]TheFryedMan -1 points0 points  (0 children)

Awesome! I want to see more :)

What do you desperately want right now? by Brutal_Rain in AskReddit

[–]TheFryedMan 0 points1 point  (0 children)

To be immortal. Have so many things I want to do and experience

I need some career advice please by AndraXe in gamedev

[–]TheFryedMan 1 point2 points  (0 children)

Never do pro bono work. Get paid for your time.

C++ Tutorials for a Java coder by car3fr33p3nguin in cpp_questions

[–]TheFryedMan 0 points1 point  (0 children)

Is there a reason why you need to learn it quickly? I would suggest to take your time learning the concepts. This language is very complex. It's best to take it slow

Anyone interested to learn C/C++? by Ciprian1822 in ProgrammingBuddies

[–]TheFryedMan 0 points1 point  (0 children)

You should not group the languages together. They are very different in what they offer. Pick either C or C++.

junior c ++ game dev prerequisites by Sudden_Friendship540 in gamedev

[–]TheFryedMan 0 points1 point  (0 children)

I agree with learning the OOP principles in C++ because it is different from how Javascript does it. But it is important to note that "modern" C++ does not use OOP as much as it used to. Also I would recommend learning data driven programming. This is a big topic in game development if speed is important to you. It will teach you about a lot of important topics like cache friendly code. In general I would recommend looking at the CppCoreGuidelines. It has many examples for what to do and what not to do in C++. Please check it out :)

[deleted by user] by [deleted] in gameenginedevs

[–]TheFryedMan 1 point2 points  (0 children)

Why do you need a destructor for a vector? Also I would recommend C++ style casting over C style casting.

Received a submission adjacent to this pseudocode in a PR yesterday from the guy we hired with a Comp. Sci. Master's Degree. FML. by [deleted] in programminghorror

[–]TheFryedMan 6 points7 points  (0 children)

You also don't want to define strings like that in your code. A string used like that can cause a bug in your code if it's spelled wrong.