Homebrew C or C++ ?

  • Thread starter Thread starter randomdev
  • Start date Start date
  • Views Views 2,338
  • Replies Replies 9

randomdev

Well-Known Member
Member
Joined
Jun 7, 2015
Messages
155
Reaction score
53
Trophies
1
XP
258
Country
Brazil
hello, is the C is "better" than the C++ to dev on a 3DS ? Thanks for any answer.

And sorry for my bad English btw
 
hello, is the C is "better" than the C++ to dev on a 3DS ? Thanks for any answer.

And sorry for my bad English btw

It depends on how you usually develop.
If you like using strings, classes, methods, booleans and so on, take C++.
If you like implicit casts, char arrays as strings as so on, take C.
 
  • Like
Reactions: randomdev
hello, is the C is "better" than the C++ to dev on a 3DS ? Thanks for any answer.
Neither is truly "better" than the other as both are Turing complete. That being said, modern C++(11/14) offers a lot of features that make programming using it clearer and simpler while maintaining the ability to take control over performance.
Your definition of "better" can change with your goals of course. If you plan to eventually work for a game development company for example, the industry is largely dominated by C++, followed by light use of C and assembly language. According to a talk by Mike Acton, Insomniac Games doesn't use, or discourages the use of, templates, exceptions, iostreams, multiple inheritance, and operator overloading. This, I imagine, would make their codebase very C-style while still enabling many of the core language features of C++, so knowing C++ would be better, but understanding C would also be essential to this type of work.
 
  • Like
Reactions: randomdev
On my experience: I prefer C++ but C will be less complicated for some things (the whole ctrulib is written in C, and you should be familiar with the use of extern and understand how the linking process is done)
 
  • Like
Reactions: randomdev
I'd go with C , then if you're familiar enough go with C++. At least that's how I did.

Also I find C bloated already, so if you want to get both bottom up and top down correctly, learn assembly. This will make your debugging life easier in the long run (where a debugger is not present)
 
  • Like
Reactions: randomdev
C++

or OOP in general, makes life easier, especially with something as complicated as game dev.

Definitely this. I still prefer learning C first so you gain a finer understanding of low-level details and properly appreciate the higher-level languages. It is like learning to drive a car but all you know is that the breaks slow you down and the throttle makes you accelerate. If you don't learn to understand the breaks, throttle, etc, you won't know their limitations and capabilities and that lack of knowledge ends up causing all sorts of problems.

But that is my opinion and every person is different.
 
  • Like
Reactions: randomdev
Personally I hate C. C++ is significantly easier to use in my opinion. Lack of classes and arrays is enough of a reason not to use C over C++. And if I ever see another "char *", "char x[]" or whatever it will be too soon.
 

Site & Scene News

Popular threads in this forum