C or C++ ?

Discussion in '3DS - Homebrew Development and Emulators' started by cynosura, Sep 15, 2015.

  1. cynosura

    cynosura GBAtemp Regular

    Jun 7, 2015
    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
  2. Rinnegatamante

    Rinnegatamante GBAtemp Psycho!

    Nov 24, 2014
    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.
    cynosura likes this.
  3. Reisyukaku

    Reisyukaku Onii-sama~

    Feb 11, 2014
    United States
    I almost never use C++ in anything. I'd only consider using it if i was making a really big homebrew game, even then, i get less problems using C.
  4. machinamentum

    machinamentum GBAtemp Regular

    Jul 5, 2015
    United States
    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.
    cynosura likes this.
  5. hippy dave

    hippy dave BBMB

    Apr 30, 2012
    United Kingdom
    If you're asking about which is best for the 3ds, I don't think it makes a difference. So use whichever works best for you.
    cynosura likes this.
  6. cebolleto

    cebolleto GBAtemp Regular

    Mar 5, 2010
    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)
    cynosura likes this.
  7. Coto

    Coto GBAtemp Addict

    Jun 4, 2010
    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)
    cynosura likes this.
  8. TheCruel

    TheCruel Developer

    Dec 6, 2013
    United States

    or OOP in general, makes life easier, especially with something as complicated as game dev.
    cynosura likes this.
  9. Zanoab

    Zanoab GBAtemp Regular

    Dec 4, 2009
    United States
    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.
    cynosura likes this.
  10. mashers

    mashers Stubborn ape

    Jun 10, 2015
    Kongo Jungle
    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.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice