handmade.network » Forums » C vs. C++ vs. C# (Beginner)
Telash
Mikael Johansson
78 posts
1 project
#14920 C vs. C++ vs. C# (Beginner)
2 weeks, 1 day ago

ratchetfreak
The extra compile time when going from C to minimalist C++ is negligible.

C++ compile times start to explode once you have very large and template heavy headers being included. Which in turn affects link time when a lot of duplicate symbols from inline functions and template instantiations need to be pruned.


When compiling the identical code in G++ instead of GCC, the compile time is a second longer. No seconds are negligible for my workflow.

The biggest obstacle to great software is lack of motivation. Motivate each other!
Instead of reinventing the wheel, we should put chariot wheels on jet planes!
Kamelitø
2 posts
#14930 C vs. C++ vs. C# (Beginner)
2 weeks ago

So for what I’ve seen is that Minimalist C++ @ HN is operator and function overloading. What else? Is there a complete list?
forkingpaths
Martin Fouilleul
37 posts
1 project

Sound Engineer / Programmer

#14931 C vs. C++ vs. C# (Beginner)
2 weeks ago

Telash
ratchetfreak
The extra compile time when going from C to minimalist C++ is negligible.

C++ compile times start to explode once you have very large and template heavy headers being included. Which in turn affects link time when a lot of duplicate symbols from inline functions and template instantiations need to be pruned.


When compiling the identical code in G++ instead of GCC, the compile time is a second longer. No seconds are negligible for my workflow.


On the other hand, compile time is probably less of a concern when you are in the process of learning, and essentially building small to medium sized projects / exercises, as opposed to working on a large codebase.

I would say pick C because it's easy to learn and has all the basics that you need to understand in the first place, yet it doesn't try to hide how the machine is working. Using some features of C++ like operator overloading is really a matter of taste and convenience at that point.

Also, knowing a bit of C++ is handy to read other people's code. Just don't spend too much time on trying to master all the details of templates or object-oriented polymorphism : it will make you feel smart, for sure, but that's not the goal of learning :-)


Martin
rby90
1 posts
#14934 C vs. C++ vs. C# (Beginner)
2 weeks ago

If you do end up going with C I suggest trying to grab a copy of Programming C: A Modern Approach fantastic book although expensive. Also, I recently compiled a list of project based tutorials in C on Github that might be helpful.
astromop
Astromop
4 posts
#14936 C vs. C++ vs. C# (Beginner)
1 week, 6 days ago

rby90
If you do end up going with C I suggest trying to grab a copy of Programming C: A Modern Approach fantastic book although expensive. Also, I recently compiled a list of project based tutorials in C on Github that might be helpful.


Thank you so much for these resources, they are amazing! And thanks to everyone for taking the time to share your insight and expertise, it is much appreciated.

So far my book list is:

Computer Graphics: Principles and Practice in C (2nd Edition)
Foundations of Game Engine Development, Volume 1: Mathematics
Real-Time Rendering, Third Edition
Real-Time Collision Detection

I have also added the book recommended above.

As for what portion of C++ I am going to use, I've decided that I need to gain much more experience with C before I should consider utilizing any C++ features, as my reasoning for why I should utilize them would simply be derived from a lack of knowledge. Until then, I will stick with C.
Delix
Ryan Fleury
85 posts
1 project

Student and developer of The Melodist

#14937 C vs. C++ vs. C# (Beginner)
1 week, 6 days ago

Kamelitø
So for what I’ve seen is that Minimalist C++ @ HN is operator and function overloading. What else? Is there a complete list?


I think it varies for each developer, and so I think it'd be valueless to define precisely. The way I see it, "minimalist C++" is writing software that is compiled from C++, doesn't make much use of most modern C++ language features, and does this usually to follow with the handmade spirit fundamentally. There are certain patterns that this way of software development tends to conform to, but not necessarily (object-oriented programming is not nearly as common in the set of developers who follow this way of software development, for example, because many modern C++ features were designed to facilitate object-oriented programming).

Hesitating to define what this term means precisely does not necessarily mean defining it in a less precise fashion tells us nothing. There is the gray area that is somewhere in the middle between "minimalist C++" and "non-minimalist C++", but what is most important is that we recognize the difference in nature between a shift toward minimalist C++ versus that away from minimalist C++.

This is also far less important, in my opinion, than the difference between "handmade" and "non-handmade".

Developer of The Melodist
Mr4thDimention
Allen Webster
347 posts
2 projects

Heyo

#14945 C vs. C++ vs. C# (Beginner)
1 week, 5 days ago Edited by Allen Webster on April 17, 2018, 8:28 p.m. Reason: grammar

Kamelitø
So for what I’ve seen is that Minimalist C++ @ HN is operator and function overloading. What else? Is there a complete list?


Delix
...
This is also far less important, in my opinion, than the difference between "handmade" and "non-handmade".


Since I threw that term out there, I can explain what I specifically meant. I was specifically trying to emphasize using languages where most of your time investment goes into transferable skills. The more quirky the language is, the more time you will invest into understanding those quirks, which are not transferable skills. "Full" C++ is without a question too quirky, and C is maybe missing useful features. So for me "minimal" C++ is the set of features that don't increase how much I think about the language. Which features those are is probably personally different from person to person, but as Delix suggested, I too think that people who try to answer that question with a "handmade" attitude tend to come up with similar looking results.
CaptainKraft
Jeremiah Goerdt
192 posts
2 projects

Stay-at-home Dad, Programmer, and Linux apologist.

#14952 C vs. C++ vs. C# (Beginner)
1 week, 5 days ago

Mr4thDimention
I was specifically trying to emphasize using languages where most of your time investment goes into transferable skills. The more quirky the language is, the more time will be invested into just understanding the quirks of that language, which are not transferable.


You nailed it. I wish more people were talking about this.

Build a man a fire, he'll be warm for a day.
Set a man on fire, he'll be warm for the rest of his life.
Kamelitø
2 posts
#14959 C vs. C++ vs. C# (Beginner)
1 week, 4 days ago

Doe it means using C++98/03 and not modern C++11/14/17?
Is OOP part of minimalist C++?
Is it like Orthdox C++?
https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b
TinyConstruct
Andrew Osthoff
4 posts

None

#15014 C vs. C++ vs. C# (Beginner)
6 days, 5 hours ago

I can speak to those last 3 books as being good reads. If you want a more general, very wide view of game programming topics, I'd suggest Jason Gregory's Game Engine Architecture 2nd Edition. For $50, I think it strikes a pretty good balance between pointing out lots of concerns while also diving in where space permits.

FWIW, learning C# is extremely worth it. If your goal is to get a game programming job sometime in the future, baaaasically every current entry-level position I see prefers some amount of C# knowledge. A lot of companies use it on their tools side.

None
OliverMarsh
Oliver
56 posts
2 projects

A budding game developer and programmer

#15075 C vs. C++ vs. C# (Beginner)
1 day, 22 hours ago

Another resource is game programming patterns . You can view the whole book on the site. I found the Bytecode chapter a good read.