Is there an advantage to starting C first over C++?

Will it make a difference or not?

  1. 2 weeks ago
    Anonymous

    C is a simpler language but it will teach you how to work with memory and write efficient and sensible code. C++ is a beast that you can then spend years trying to learn.

    • 2 weeks ago
      Anonymous

      How long should I spend on C before getting into C++?

      • 2 weeks ago
        Anonymous

        Until you can write linked lists, BSTs, graphs and hash tables in C from scratch

        • 2 weeks ago
          Anonymous

          >write linked lists
          That shit is foul fr on god
          t. first year comp sci

          • 2 weeks ago
            Anonymous

            it's extremely simple and if you can't do it already then you will be filtered later on

            • 2 weeks ago
              Anonymous

              I worked with a guy who started at the company a few years before me. C++ only. There's no way he could have implemented a linked list. Nice guy though and he was good at other aspects of programming just not the actual code writing part.

              • 2 weeks ago
                Anonymous

                >good at other aspects of programming
                that's because it's ridiculously easy to fake it until you make it in the tech industry with good enough social skills

              • 2 weeks ago
                Anonymous

                the standard library brain

            • 2 weeks ago
              Anonymous

              Not that anon but made a typedef struct with a pointer and value and called it node and then made a function to add more nodes by setting the pointers to point to another Node var. So proud of myself! And did all that by reading the first sentence on Wikipedia about Linked Lists!

            • 2 weeks ago
              Anonymous

              You need to be able to:
              index the linked list
              search through the linked list
              add and remove nodes
              etc.
              not the hardest the thing in the world but not trivial
              btw if you leave a dangling pointer your mum will die in her sleep tonight

              • 2 weeks ago
                Anonymous

                all of those operations are indeed trivial

      • 2 weeks ago
        Anonymous

        As long as you feel like it teaches you something new - and I don't mean language features, you shouldn't stop once you know all the syntax and most of standard library stuff. I'd say pick a project, maybe something like Tetris once you feel more comfortable. It should make you learn how to use heap, how to write reusable code, how to work with input... It's also probably best if you avoid copying some existing example but work your way one problem at a time. That kind of experience is useful no matter the language, but I think C teaches it nicely. With C++ you have so many options how to solve certain problems, it can get quite overwhelming, I fear that's not the best way to learn programming... Of course I'm saying all this assuming you haven't programmed much before so take it as that.

        • 2 weeks ago
          Anonymous

          Thanks anon been following along with a book. I learned C++ a long time ago and I thought the same thing.

          • 2 weeks ago
            Anonymous

            No problem. You know, I've been programming C++ professionally for 6 years and before that used it in small projects at least 2... And I'm not even trying to teach myself all of its features. Just pick what you want to do, focus on the problems at hand, look up information on how to solve them (math, code design choice, language feature, whatever). It's most of what programmers in the field do daily anyway. And lastly, IDK how serious are about programming or if you are a compsci student already, but having a general overview in that area is very useful, so you might wanna start looking at the subjects: https://teachyourselfcs.com/

            • 2 weeks ago
              Anonymous

              >https://teachyourselfcs.com/

              I mainly wanted to get into C++ to do game hacking. But I heard learning C can be a better start so yeah for now at least thats what I will do for fun at least hoping after I get a degree I could use this to pivot into cyber security or something...

    • 2 weeks ago
      Anonymous

      Is C the only language with which you can learn how the memory works? Like could I do with Go (e.g., garbage collected and not pointer arithmetic)?

    • 2 weeks ago
      Anonymous

      >C++ is a beast that you can then spend years trying to learn.
      No, but the STL is
      C++ without any included libraries is barely different

      OP should learn C++ without using anything from the STL
      that's basically the same as learning C, but instead you practice classes, polymorphism, etc that is seen in other languages

      • 2 weeks ago
        Anonymous

        >etc
        how small is that etc?

        • 2 weeks ago
          Anonymous

          there's basically nothing else

          templates, but, they're not a very common concept so dont even bother learning that until you're a guru

          • 2 weeks ago
            Anonymous

            I consider templates to be pretty basic.

            • 2 weeks ago
              Anonymous

              Just to add to that, some template meta-programming tasks are indeed hard and not something you will do everyday but just creating something like a templated container is easy.

      • 2 weeks ago
        Anonymous

        >practice classes, polymorphism, etc
        Jesus fucking christ. Now I know why I stopped coming to this shithole for anything other than a laugh.

        • 2 weeks ago
          Anonymous

          It's very hard to pry people away from their nursing bottle (object oriented programming).

  2. 2 weeks ago
    Anonymous

    You can start anywhere. At the most basic level there is hardly any difference between languages. They only start to diverge as the complexity of what you are trying to accomplish goes up.

  3. 2 weeks ago
    Anonymous

    >starting with meme languages in 2020+3
    lmao start with gpt4 retardkun

    • 2 weeks ago
      Anonymous

      That's not a programming language.

      • 2 weeks ago
        Anonymous

        gpt5 will be written in gpt4.

        • 2 weeks ago
          Anonymous

          That doesn't make any fucking sense.

          • 2 weeks ago
            Anonymous

            kys, retarded idiotic nagger homosexual cuck.

            That's not a programming language.

            • 2 weeks ago
              Anonymous

              If your going to call chat gpt a coding language then so is google anon

            • 2 weeks ago
              Anonymous

              Get inseminated, I don't even know C# or use C++. And no, I don't have a single book on programming.

    • 2 weeks ago
      Anonymous

      kys, retarded idiotic nagger homosexual cuck.

    • 2 weeks ago
      Anonymous

      gpt4 is a nothingburger so far you actual retardkun
      whenever you see somebody blindly worshipping gpt, you know they don't actually have any knowledge of the field at all

      • 2 weeks ago
        Anonymous

        Its basically like a very smart google. AI is getting there but GPT is overhyped I thought it was insane at first but it can't even do any complex mathematics. It fails when it doesn't have good data and fills in the gaps with nonsense.

        • 2 weeks ago
          Anonymous

          It also flat out lies to you or even makes shit up. Give it a pastebin of code and ask it what code it's in, then ask it to tell you what's on line XXX, it will just make shit up.

          • 2 weeks ago
            Anonymous

            In a way its very human in the sense that people have hallucinations or make up stuff when they don't really understand whats going on

            • 2 weeks ago
              Anonymous

              Yeah that's fine, all I'm saying is a lot of the shit it says has to be double checked and fixed. It's nowhere near a solution, it's only a tool at this point.

              • 2 weeks ago
                Anonymous

                I would say its better then a lot of Indians anon...

              • 2 weeks ago
                Anonymous

                You wouldn't be wrong anon...

                Funny part is street shitters will be offering to complete coding jobs using gpt4 and their results will finally work...

      • 2 weeks ago
        Anonymous

        Depends on what they views as "programming". For some people a few lines of code that scrapes a website and calls an API with that content then spits back the results is a program.

  4. 2 weeks ago
    Anonymous

    All roads eventually lead back to C. It doesn’t matter which one you choose, you’ll come around in the end, a better programmer.

  5. 2 weeks ago
    Anonymous

    start with assembly

  6. 2 weeks ago
    Anonymous

    I started learning C++ after learning C#.
    C++ isn't as hard as people make it out to be but if it's your first programming language starting with C is probably a good idea.

    • 2 weeks ago
      Anonymous

      >C++ isn't as hard as people make it out to be
      It's actually much harder, but the problem is that this won't be obvious until you have significant experience with it.

      C++ isn't particularly hard to learn the basics of, you can learn enough to write and modify basic programs in it without that much more effort than most languages, and once people have gotten to that level, they will makes claims like the poster I'm responding to have. But C++ offers such a huge quagmire of subtle ways to just fuck things up when you actually try to create complex programs in it that aren't at all obvious, and trying to read arbitrary C++ code is usually far tougher than most other languages in practice.

      Now, this isn't to say that C++ is unusable, there are ways to manage it and its complexity, but you basically always want to have someone who knows it way better than you do to guide you when working on any substantial project using it unless you've spent a ridiculous amount of time understanding its pitfalls.

      • 2 weeks ago
        Anonymous

        >muh pitfalls
        Midwit take.

        • 2 weeks ago
          Anonymous

          Acting like the pitfalls of C++ are things that any "sufficiently smart student" will just 'deal with' is precisely the midwit take. Generally, the smarter and more experienced someone is, the more aware of the language's problems they are and how much caution it is wise to have when using it. If you're at a level where you're like "I totally remember to use free/delete, this stuff shouldn't be a problem for me", then you don't get it. Take advice from

          C is a bomb, C++ is a bomb in a sea of naplam. Almost no field of software uses C or C++ unless you're doing very rarefied things like coding high performance algorithms for HFTs or signal processing.

          • 2 weeks ago
            Anonymous

            tell me more wise man, what are the actual bombs that i should avoid by using the most performant language in the planet hearth

    • 2 weeks ago
      Anonymous

      >C++ isn't as hard as people make it out to be
      That depends how far into it you go. When you get into template metaprogramming it gets pretty hairy.
      "move" semantics are enough to filter a lot of people, it seems, and that's just the tip of the iceberg.

  7. 2 weeks ago
    Anonymous

    install gentoo

  8. 2 weeks ago
    Anonymous

    C is a bomb, C++ is a bomb in a sea of naplam. Almost no field of software uses C or C++ unless you're doing very rarefied things like coding high performance algorithms for HFTs or signal processing.

    • 2 weeks ago
      Anonymous

      >Almost no field of software uses C
      >implying you ever had a job

      • 2 weeks ago
        Anonymous

        My job is writing C code for industrial thermal cameras. Innumerable platforms are built in C/C++, but you will rarely have to touch the language itself.

        • 2 weeks ago
          Anonymous

          Do you have any experience with Rust? Do you think it's a better option for creating new software?

  9. 2 weeks ago
    Anonymous

    Never ever have anything to do with c++ its cancer that will ruin your life. Its just not worth it.

    • 2 weeks ago
      Anonymous

      As a C++ programmer I must agree with your advice. It's great for my job security

  10. 2 weeks ago
    Anonymous

    Is there any advantage to C being a first language over say one of the enterprise CRUD langs?

  11. 2 weeks ago
    Anonymous

    Believe it or not, there still pitfalls that will bite you in the ass with C++ that are even beyond the language itself, more to do with implementation of the underlying compiler and standard libraries.

    Perfect example is as follows ... the WASM committee trying to get the std library into a form useable with gcc/clang as WASM is totally roadblocked now by support for exception handling implicit within the compilation of C++ to WASM to include the std library. Fucking exception handling IS NOT SUPPORTED IN CLANG's/GCC's wasm32/wasm64 bytecode output because its fucking implementation specific to the compiler + std lib.

    They have not admitted this but its way WASI (the attempt at providing C++ users with a WASM compiled std lib + libcstd) is currently DEAD IN THE WATER.

    I have given up on clang/gcc compilation of C++ to wasm32/wasm64 now with its flags because the fuckers can't guarantee an implicit language construct (exceptions) that simply must work to provide proper std library supprt.

    I've got back to just writing C to compile to WASM using clang once I realised this shit. Its so fucking infuriating in invest time on something to discover its a dead end.

    This is just one example of how C++ will fuck you in ass beacuse of how the underlying machinery supporting C++ programing is itself fucked.

  12. 2 weeks ago
    Anonymous

    C++ seems to cause brain damage so I'd start with C.

  13. 2 weeks ago
    .

    Rust|rust|Cnile| C | c |C++|c++

  14. 2 weeks ago
    Anonymous

    everything C has, C++ also has. C++ is built on top of C. So if you want to be a bit more than a pajeet stackoverflow copier, do learn C, it will help you understand what the countless C++ features actually do

    • 2 weeks ago
      Anonymous

      This actually isn't true and there's meaningful shit you can do in practice in C that you won't be doing in C++.

      • 2 weeks ago
        Anonymous

        example?

        • 2 weeks ago
          Anonymous

          To make a counter point to

          >C++ is a beast that you can then spend years trying to learn.
          No, but the STL is
          C++ without any included libraries is barely different

          OP should learn C++ without using anything from the STL
          that's basically the same as learning C, but instead you practice classes, polymorphism, etc that is seen in other languages

          in pure C you now get guarantees that you can cast a pointer to a given structure to a pointer to its first member:

          C99 6.7.2.1 (13): A pointer to a structure object, suitably converted, points to its initial member... and vice versa. There may be unnamed padding within as structure object, but not at its beginning.

          Because of this, it's basically trivial to then implement 'custom' polymorphism using single inheritance in C without relying on a pre-existing class system, you create a structure containing the function pointers you want, and include a pointer to that as the first member of another structure and then supply the implementation you need and otherwise not have to bother with C++ style classes.

          Likewise, implementing APIs is virtually always vastly more simplified and more compatible using C as opposed to have multiple C++ programs try to pass shit between each other.

        • 2 weeks ago
          Anonymous

          variable length arrays (run time on the stack) are C-only
          immensely useful, no equivalent for C++ that I'm aware of, in C++ either it's on the stack with a fixed size at compile time, or it's on the heap

  15. 2 weeks ago
    Anonymous

    I've been writing C++ for 12 years, is there anything I can learn from using pure C?

    • 2 weeks ago
      Anonymous

      >is there anything I can learn from using pure C?
      yes you will learn to be comfy
      once you use VLAs you will start to hate C++ for being too reliant on the heap

  16. 2 weeks ago
    Anonymous

    cpp combines the worst parts of c and java

    • 2 weeks ago
      Anonymous

      >left handed
      ngmi

    • 2 weeks ago
      Anonymous

      DO NOT compare j*va with any respectable programming language

  17. 2 weeks ago
    Anonymous

    Yes if you start with C and then you stop there and forget about C++.

Your email address will not be published. Required fields are marked *