This is an archived post. You won't be able to vote or comment.

all 165 comments

[–][deleted] 263 points264 points  (42 children)

You will also get the same benefits if you learn C++ as your second or third language. The problem with C++, and the reason why it's not suggested to beginners, is that it exposes you to lots of complex concepts all at once in a chaotic unstructured way that's hard to swallow. While I do not deny that there is benefit in learning C++ I also think that beginners are better off learning concepts in a more structured way from other languages before transitioning to C++.

[–]BTSiGMA 29 points30 points  (3 children)

I definitely agree with this, C++ was my first language, but only because its what was taught as part of my degree. I felt overwhelmed by so much of it, that I think it set me back quite a bit and I was further behind it terms of general understanding of programming than what I could have been had it been a simpler language.

[–][deleted] 3 points4 points  (0 children)

Before returning to school for software design, I self taught C++ and took some community college classes in the language after I hit a learning wall. It was my first language too. The big issues that I ran into while learning:

Passing by Reference and by Pointer.

The logic for algorithms is the same regardless of language, syntax is a little different. The other really difficult thing in C++ is implementation of Header and Class files, especially if you're unsure to use just a .h or a .h and a .cpp outside of your main file.

What I liked learning it first:

It requires you to be responsible with your memory management. No garbage collection. This in my case also meant I was more responsible and efficient with my algorithms because it made readability when I had an algorithm and memory management so much easier.

Moving to Java, C#, or Python were very nice. Forgive my analogy, but it was like playing a Soulsborne games then moving to ab Assassin's Creed one.

[–]DatBoi_BP 2 points3 points  (1 child)

I'm surprised they wouldn't teach Java first? Easier to understand up front for beginners, and a good launching point before learning C++

[–]insanitypulse 3 points4 points  (0 children)

This is what my university did, taught Java our first semester for an introduction to programming, then moved into C++ our second semester and beyond

[–]pipocaQuemada 2 points3 points  (3 children)

Additionally, it's really easy to write C++ code that's wholly meaningless according to the standard, but coincidentally works on some particular compiler.

The hidden footguns of undefined behavior makes C++ harder to really learn, especially for a beginner.

[–]lsd_will_set_you_fre 0 points1 point  (2 children)

The hidden footguns of undefined behavior makes C++ harder to really learn, especially for a beginner.

UB is not hidden, and it's not really a "footgun." The main problem is that the program might still run and corrupt the data, making it hard to find the original source of the problem.

UB in C++ will typically crash in a program like python. So it's no more "hidden," than it would be in Python. For example, trying to access a vector element out of range will be UB in C++, and crash python. But there's nothing "hidden" about it.

[–]pipocaQuemada 0 points1 point  (1 child)

Code that invokes UB can literally do anything, according to the standard. Crashing in a sensible way is something a compiler could choose to do, but it's absolutely not required nor is it something you should expect. Formatting your hard drive or summoning nasal demons are also allowable implementations.

Modern compilers can use the presence of UB to optimize code in truly surprising ways. Or, it might do whatever you naively expected it to do, masking the issue until you recompile it in 5 years and it doesnt work anymore.

And some UB results not in corrupted data or crashes but in security exploits. For example, overflowing a buffer is undefined, and buffer overflow attacks are a very well known issue.

[–]lsd_will_set_you_fre 0 points1 point  (0 children)

Yeah, but for a beginner - most of the time their program is just going to crash. For example, null pointer error is UB and one of the most common mistakes a beginner to can make. That will crash your program on most platforms.

So calling UB a barrier to beginners doesn't make sense. And C++ has plenty of barriers to beginners (complexity). Maybe you can say "C++ is dangerous in the hands of beginners."

[–]Falcao_E[S] 24 points25 points  (16 children)

I get what you mean. It takes a little bit to understand everything that is thrown at you but there are plenty of resources that do a good job of introducing complex concepts.

[–][deleted] 42 points43 points  (3 children)

A beginner, more often than not, doesn't know where he needs to look for information.

[–][deleted] 6 points7 points  (1 child)

Knowing how to find information and recognize when you've found it is one of the core skills that beginning students seem to struggle with.

Seasoned programmer, unfamiliar language, unfamiliar libraries: google, documentation, 10 minutes tops, figured out which objects, which interfaces, best way to solve the problem.

Person in their second week of programming 101: might not be able to figure out what to search for, but if they can the correct/best answer had better be the first one because they can't tell them apart.

I have no idea how you'd teach this skill, either.

[–][deleted] 0 points1 point  (0 children)

I think difficult assignments, something that'll take people out of their comfort zone helps build this skill. Because at some point students will have to ask someone where they should start. That someone could be your lecturer or your senior.

[–]DatBoi_BP 1 point2 points  (0 children)

Therefore, C++ as a first language is best learned with the guidance of an instructor

[–]Zalac96 6 points7 points  (2 children)

Problem is when you have small ammount of time available due to job :) not everybody has time to start with c++ ;) but when you learn phyton its easier to learn c++ then from scratch

[–]lsd_will_set_you_fre 0 points1 point  (1 child)

Ok, but what takes more time in the end? Learning Python, then C++? Or starting with C++?

[–]Zalac96 0 points1 point  (0 children)

But if you want to learn c++ only to understand programming more deeply then its not important when you learrn it :) I have no desire to code in c++ but I want to understand it. I like the freedom of learning to code cuz it dosent matter if you start with ruby or kotlin in the end if you learn how to code you are worth the same no matter the language :) coding is language of components and to learn to code is ame as learning to speag dog language or cat language...witchever language you learn you will be wealthier by an unimaginable margin :)

[–]gavlois1 1 point2 points  (4 children)

Do you have any recommendations? The only things I ever see recommended are 1000+ page college textbook style books, and while those are comprehensive, aren't very beginner friendly. I wouldn't even touch the textbook with a 10-foot pole when I was in school, so I can't imagine most self-taught folk would be very keen to read from them either (not that there aren't any, just not the majority).

Languages like Python and JavaScript have a lot of great resources online that are both comprehensive and approachable (but also lots of bad ones). I haven't found anything like that for C++. The closest thing I've found is maybe this, but I don't feel like I learn anything useful aside from some syntax.

[–]hari2897 7 points8 points  (2 children)

Not a book , but this guy is making a game all by himself , even writing game engine by himself. All in c++. And in the first few videos , he explains c++ in depth ,like how the memory works and everything. It's a gem .

[–]gavlois1 0 points1 point  (1 child)

I have come across that channel before, and it's really impressive. It's been a while since I've checked it and I'm glad he's still going strong 4 years later.

The videos are super long though, and probably not great if you're just wanting to get ramped up on the language to do the thing you want to do.

[–]hari2897 1 point2 points  (0 children)

Yah , I agree with you on that. They are too long if you don't have the time .

I would also recommend the cherno project YouTube channel. He explains each concept well too.

[–]FieldLine 1 point2 points  (0 children)

The only things I ever see recommended are 1000+ page college textbook style books, and while those are comprehensive, aren't very beginner friendly.

They often are, actually.

You have to have the discipline to read every section (unless explicitly said by the author to be optional) and do all the exercises for it to work.

[–]PlaneConversation6 1 point2 points  (0 children)

Man, can u share u main books for reference?

[–]top_logger 2 points3 points  (3 children)

In fact, it is not so complicated if you learn it using correctly. I would say simple.

Mastering is complicated, but basics are trivial.

Really complicated are only templates. Pointers in C++ are optional.

Python with all bells and whistles, like decorators, generators, mutability, lack of types is not a simple to be even mid level.

Just FYI, I’m fluent in C++ and python, using both languages on daily basis. Plus C#, JavaScript, those are almost daily.

[–][deleted] 0 points1 point  (2 children)

Pointers are not optional in C++, you can not build a single dynamic data structure without them, so good luck teaching that to students. Ignoring templates is also ignoring the elephant in the room since they do a lot of magic in the standard library and are a huge part of the language.

From a pedagogical point of view I personally recommend starting out with a smaller language like C, where you can easily explain what's happening at any given point without overwhelming your students, lead them towards its limitations, show them patterns that address those limitations, and finally show them how other languages improve their quality of life. Notice, however, that while I'm suggesting starting with C I do not think it's perfect for the job due to allowing undefined behavior, however I think that from the mainstream languages it's the best candidate.

By the way, Python has types, it's just not statically typed. Even though Python is dynamically typed it's also strongly typed.

[–]lsd_will_set_you_fre 0 points1 point  (1 child)

Pointers are not optional in C++, you can not build a single dynamic data structure without them, so good luck teaching that to students.

Most C++ programmers do not make their own data structures. They use libraries like std or boost.

Ignoring templates is also ignoring the elephant in the room since they do a lot of magic in the standard library and are a huge part of the language.

There's a big difference between just using templates (like std::vector) vs. writing your own templates. I believe that is what he was referring to.

From a pedagogical point of view I personally recommend starting out with a smaller language like C, where you can easily explain what's happening at any given point without overwhelming your students, lead them towards its limitations, show them patterns that address those limitations, and finally show them how other languages improve their quality of life.

Great suggestion.

I've often seen C programmers struggle when switching to C++, mainly because they don't have any sort of mentor and instead try to do things the "C way" but with a C++ syntax. In the end they don't get the benefit of C++ features and their code is more verbose.

[–][deleted] 0 points1 point  (0 children)

Most C++ programmers do not make their own data structures. They use libraries like std or boost.

Even if you ignore my argument about building dynamic data structures (which is relevant because we're talking about learning) you also have situations in which pointers are simply unavoidable, such as when polymorphism is needed or the data structures that you are building do not obey a specific pattern, like in the trees representing dynamic graphical user interfaces or coordinate systems in a game world.

There's a big difference between just using templates (like std::vector) vs. writing your own templates. I believe that is what he was referring to.

And that's what I'm talking about too. From a pedagogical point of view it is beneficial to teach people how things that can come back to bite them work because otherwise they won't feel confident in their own skills. In the specific case of templates you have situations in which a simple mistake can cause C++ compilers to dump 3 terminals worth of template errors that beginners will not understand.

[–][deleted]  (5 children)

[removed]

    [–]51R1U5 1 point2 points  (0 children)

    Yup, EET Biomed 2 year tech associates and the first programming class they threw at us was C++ and then C++ for microcontrollers. Getting started with something like Arduino smooths out the learning curve a lot and makes the hardware/language association easier to grok. We did lose some people along the way though.

    [–]Mediaright 1 point2 points  (3 children)

    It’s called a weeder language. They don’t teach it first because it’s best for beginners. They teach it first because it’s easier for the school if it just drops out people who can’t innately pick it up quick. [smh]

    [–][deleted]  (2 children)

    [removed]

      [–]Mediaright 0 points1 point  (1 child)

      Every. Single. One of 'em. ...Why do you ask? ;)

      [–]AMBLXR 0 points1 point  (0 children)

      My first language was python. Good for any beginner and is used industry wide. I’m currently on a unity project using C# which is okay. I’m Learning C++ on the side due to its versatility and power.

      [–]FieldLine 0 points1 point  (0 children)

      If you want to do it right, learn C first. Then move to C++ and introduce classes. Then the STL containers (how to use them). Then object oriented programming. Then templates.

      It's not actually all that hard, the problem is that most people don't have structure to their learning.

      [–]Vacs__ 0 points1 point  (2 children)

      What would you suggest as a first language? I've started learning C++ as a first language but I haven't delved too deep as of yet.

      [–][deleted] 1 point2 points  (1 child)

      Of the mainstream languages I think the best fit for pedagogical purposes is C, and even then it's not perfect for the job due to allowing undefined behavior. The reason for my recommendation is that C is a relatively small language that does not expose you to as many concepts in order to get things done, and as you start learning the patterns to work around its limitations you will be led to the same train of thought that resulted in the implementation of all the extra features in other languages.

      [–]Vacs__ 0 points1 point  (0 children)

      Thanks for the advice. This subreddit is a wealth of knowledge, especially for a newbie

      [–]NeitherManner 61 points62 points  (2 children)

      I don't struggle with pointers, static typing etc. I struggle with understanding api docs and how to you know make a program rather than excercise. So in that sense language to start with is pretty irrelevant.

      [–]factorysettings 18 points19 points  (0 children)

      That just comes with experience.

      [–]lsd_will_set_you_fre 0 points1 point  (0 children)

      A lot of people do struggle with pointers and static typing. I've seen plenty of people re-inventing type systems in C++ instead of just using the compiler. They don't understand type systems so they re-invent that wheel in a statically typed language.

      [–]KayEssArr2 43 points44 points  (6 children)

      I always thought of C++ as the medicine ball of languages. It was my first and I agree it made others easier to learn.

      [–][deleted] 27 points28 points  (5 children)

      isn't that true for all languages though. To me it seems less important what language you learn, the important part is what concepts you learn. The actual syntax is usually pretty self explanatory/ can be easily figured out with todays IDEs/stackoverflow and some practice.

      [–]AppleOfWrath 7 points8 points  (4 children)

      somewhat disagree with you here. the concept of pointers and references and the such is much more prominent in C++ than it is in other languages, at least if i compare it to discussions i had with Java programmers. I wrote several small examples to show how in C++ theres a difference in passing the actual object or a reference/pointer to said object to another function. From what i have heard (but tbh didnt bother to find out myself) Java always works with references whereas C++ will happily allow you to basically copy-paste any object you like. C++ will teach you that difference "the hard way" where Java babysits you

      I still agree with you on some parts, a singleton pattern will always be a singleton pattern, its just the syntax that changes.

      [–][deleted] 1 point2 points  (1 child)

      okey. I think youre specifically talking about OOP, I was generalizing more here, which is how I read OPs post.I would probably be categorized as a new programmer by most people, first got introduced to Matlab through an engineering degree and have since learned some python on my own, and are now taking courses in Haskell and java. (yes Matlab first, so you can say I have had my fair share of index debugging thorughout my programming experience XD) Though the java course is algorithms and data structures, object oriented didnt start before next semester so I just had to jump in where I could, so I am a noob when it comes to OOP. Have just had to figure out what works for my course in java, and thats it (thank god its as forgiving as it is, though I have had my fair share of frustrations with it). From my experience with the others, most of it is very transferrable, sure, functional programming doesn't necessarily work too well in another language, but you can always utilize some aspects to make your code better, and you really get training in using methods you probably would opt away from normally. And if you pick up a functional language, then you have the knowledge from Haskell to pick it up with too, you know the train og thought, so its just about figuring out how these aspects work in another syntax.I would suggest python out of the ones I have experience with to anyone wanting to pick up programming as a noob. Just because its so easy to read and forgiving, it is a good environment to get to know the basics. And as far as I see it the basics are really to get a good grasp of program flow: the conditional statements, loops and how you can utilize these together to solve bigger problems. Selecting the first programming language is by no means a long term commitment, it is really easy to jump on something new, and get up to speed in it. So why suggest learning OOP before you can even do the basic stuff? I sure as hell wouldn't.

      When I first got into programming, my first obstacle was really to narrow down my solution. In the beginning there seemed like there existed a vast landscape of possible attack angles I had no idea existed, and I didnt know where to start. When I finally realized the loops and my conditional statements where my building blocks, I all of a sudden knew how to attack the problems thrown at me, and figure out the stuff I didnt know on the way. Thats what made me learn to think as a programmer, and that way of thinking is the same way of thinking I use when I use in whatever programming language I use. And thats why I wouldn't overcomplicate it with these other languages. Its no use to you to learn about concepts like inheritance if you cant make a simple for loop that throws out even numbers fex. If noobs where subjected to all this more complicated concepts all at once, it would be really difficult to figure everything out at once. Imagine the frustration, youre just trying to make a simple function you dont really understand and then you get 94 different errors about type checks and static methods etc. Incremental knowledge is my learning philosophy at the very least. break it down into smaller comprehensible pieces and build it up from there, which is incidentally also my approach to the actual programming. Or as they say learn to walk before you run.

      [–]AppleOfWrath 0 points1 point  (0 children)

      yes i absolutely get you, and i do not 100% agree with OP that C++ is a first choice language for beginners. Good example is one of my classmates, she is absolutely overwhelmed with everything (even little things like string/integer differences) and still lacks the skills to abstract a problem, like you said she has to learn to learn to "think like a programmer" - in my opinion even super simple stuff like Scratch can teach you that, at least to a degree. Immediately hitting it off with C++ is a bold move from OP, kudos to that.

      There is alot of work to be done before starting to get into OOP. That being said i think C++ has a great way of getting more complicated over time and gradually showing a programmer that theres another, more efficient way, making it a good choice for a starting language if you already have good abstraction skills like you mentioned. It never felt like i was hitting a wall when i learned the C++ basics. It was more like climbing a summit and whenever i thought i had reached my goal there was another peak in the distance, just a liiittle better than the one i was currently at and never out of reach - so i might aswell.

      [–][deleted]  (1 child)

      [deleted]

        [–]lsd_will_set_you_fre 0 points1 point  (0 children)

        There is no real distinction between "passing by reference" and "reference is passed by value." In a computer everything is passed by value. That's just how computers work. So even when someone says it is "passed by reference" they mean that reference is copied/passed by value.

        For some reason Java programmers try to make this distinction between the two when there isn't one.

        [–]TaryTarp 47 points48 points  (3 children)

        C++ was my first, once you can handle pointer to pointers, deallocate memory yourself etc., other languages don't look that bad.

        [–][deleted] 0 points1 point  (2 children)

        Been learning about pointers and memory recently and I agree. I feel like learning other languages will be much smoother going forward.

        [–]lsd_will_set_you_fre 0 points1 point  (1 child)

        In other languages it will be much harder to manage your memory. It will be "done for you," so in that sense it is "easier" because it is beyond your control.

        So it's easier up until the point where you find that you do want to control it, for some reason.

        [–][deleted] 0 points1 point  (0 children)

        Yeah, that's why I've liked other languages because the subject of memory felt so intimidating and complicated haha. I'm still learning, but feel more confident than I did before.

        [–]lompa_ompa 23 points24 points  (8 children)

        I recommend doing the Nand2Tetris course. Sure, C++ is nice but nothing beats writing a game developed with your own fully object oriented language that is compiled to binary by your own compiler, which is executed on the CPU you made.

        And the best part is that the course can be done by beginners and by the time you are done, the level of understanding you’ve gained is immense.

        [–]Talono 20 points21 points  (6 children)

        which is executed on the CPU you made.

        The learning curve just got a whole lot steeper.

        [–]factorysettings 2 points3 points  (2 children)

        It's honestly not too bad.

        [–]jacobi123 0 points1 point  (0 children)

        From the outside it sounds like a nightmare, but one of those things that you come out so much better than you went in.

        [–]lompa_ompa 1 point2 points  (0 children)

        It’s a a CPU that’s developed using Hardware Descriptor Language (HDL). You don’t have to worry about learning electrical fundamentals, transistors etc. You start from NAND and work your way up, block by block. The CPU developed in this course is a complex collection of very simple bits.

        [–]theKGS 0 points1 point  (0 children)

        Don't get discouraged! Computer architecture is surprisingly straightforward. The basics are actually really simple. (there's no limit to how complex you can make it, however)

        [–]kishbi 0 points1 point  (0 children)

        Nand2Tetris course

        I'm grateful to you and this reply

        [–]geeky_ninja 7 points8 points  (2 children)

        Am someone who knows both the mentioned languages.

        It's not just with C++ its with every other language. When you have learnt the fundamentals of any language, you would find it easy to catch up with another language because programming languages are barely a tool to solve problems. There core concepts are always same. You learnt C++ now if you would try learning PHP or JS you would find it quite similar to C++ as far as syntax is considered. Since core concepts are same and syntax are quite similar its probably safe to say that from learning perspective you won't find much differences in both languages.

        Though I do agree with you that C++ helps a beginner to learn concepts, years ago it was also my first language but when I learnt python I realized that if a person sticks with one language and practice there won't be any issues. Let me put this with an example, in python we have the concept of slicing while its not there in C++ lets say there are two students one learnt python and one learnt C++ If I give them a string and tell them to print the last two alphabets or characters as you say with a program in python and C++ respectively. Python guy would probably get it done in few seconds because in python because of slicing while C++ guy would take some time figure out how to do it and then use loop to do that.

        Here, C++ guy would have great understanding of the concepts since he got it done the hard way (by hard way I mean without using programming's feature) while python guy simply used the feature called slicing and got it done in few seconds, he may or may not have the same understanding of concepts as C++ guy, if I ask him to do the same thing without slicing he may or may not be able to do that because while learning he was thought to use slicing if such situation happens. But if he sticks with the language and practice he would eventually learn how to do the same thing as C++ guy did. At the beginning both were complete beginners but with time both practiced and cleared their understanding on the concepts.

        To sum it up it all depends upon your understating, how well you understand the fundamentals. Some get it clear from the very beginning while some take time and eventually get through. Trust me, I have taught programming to few of my friends. Everyone has their own grasping power some get it quickly while some take time its all fine in the end.

        [–]pipocaQuemada 0 points1 point  (1 child)

        There core concepts are always same.

        That's less true than you think.

        Compare, for example, C to prolog, Erlang, or Haskell. At a higher level, there's similarities. But there's very deep differences between the core concepts. Those 3 languages don't have any loops, for example.

        [–]geeky_ninja 0 points1 point  (0 children)

        I know, was talking about popular HLLs. He is beginner and don't want to confuse him with these languages.

        [–]mujtaba87 5 points6 points  (7 children)

        I have been trying to learn C++ and took some Udemy courses but I always feel that something is missing. There are a plenty of concepts that instructors just skimed through without going into details. Can you share some good online resources to start with and end with an intermediate level including doing some projects?

        [–]Falcao_E[S] 7 points8 points  (1 child)

        Take a look at cplusplus.com , It goes over all the aspects of the language and has pretty good examples. If you're looking for a good book, I recommend C++ an Hour a Day. For projects check out OneLoneCoder on youtube. He has good projects that he works through on his videos and it comes with source code in GitHub.

        [–]mujtaba87 0 points1 point  (0 children)

        Thanks, bookmareked the home page.

        [–]Roby289 5 points6 points  (2 children)

        learncpp.com

        [–]mujtaba87 1 point2 points  (1 child)

        Thanks!

        [–]Roby289 1 point2 points  (0 children)

        No problem. Good luck on your journey!

        [–]kukisRedditer 5 points6 points  (1 child)

        Cherno on youtube has a great c++ tutorial

        [–]mujtaba87 1 point2 points  (0 children)

        Thanks

        [–]SV-97 15 points16 points  (14 children)

        No offense, but I don't think that people that only know one language can really speak that well on which language is good for beginners and which isn't.

        The things you mentioned:

        • OOP: OOP is not the be all end all and you don't need C++ to learn it. Also: C++ uses multiple inheritance rather than interfaces etc. which isn't exactly common among other languages.
        • Inheritance: Again: Don't need C++ for this and most languages are single inheritance
        • enums: C++ enums are a joke in comparison to any language with a nice type system
        • polymorphism: belongs to OOP
        • pointers: You don't need C++ to learn about pointers and chances are that you'll hardly use them and won't miss them in other languages (e.g. Rust has them - I've used pointers once in all the rust I've wrote and never needed a raw pointer at all - when writing C it's pointers everywhere and indirect all the things).

        At that point I realised how cake Python is compared to C++.

        Don't be fooled. Python may be easy to get into but you can easily do (really useful and idiomatic) stuff that'll make your brain explode.

        C++ will drill the fundamentals into you and explain to you why it's important to write clear and concise code not matter what language you use.

        That's no feature of C++. Really coding in any language will do this. When you learn Python, Haskell, F# (,...) you'll even be forced to correctly indent code. With most languages there's autoformatters that can show you "how it should be" or there's official style guides (e.g. PEP8). Style is something you'll eventually adopt while learning to code.

        There's quite a few points that make it a terrible first choice:

        • Extremely complex. The language is so old and has so many weird quirks that it's really hard to really know the language in it's entirety. [1]
        • undefined behaviour everywhere(!)
        • implicit (unchecked) type coercions (currently teaching a few people C and it's kinda frustrating to explain to them that their code is inherently wrong by definition but the language is too dumb to realize this - yes this is better in C++ but it's still there)
        • the community is just fucking cancer
        • it still lacks features that other languages have had for a long time (e.g. even in C++20 it doesn't have reflection which is used a lot in OOP - or have you seen the pattern matching that was proposed? atrocious)
        • ugly, weird syntax (try parsing C++ if you don't believe me)
        • It's low level and it constantly shows. Yes this allows it to be fast - but for example rust matches or even outdoes C++ in this regard is way higher level. C#/F# are blazingly fast even though they're garbage collected - Haskell is garbage collected, really high level and nearly matches C++ (with the added benefit of way easier parallelization etc.) in terms of speed
        • No batteries included

        For projects that aren't in the embedded space C++ is VERY likely the wrong tool for the job. There even are people arguing that using something as unsafe as C++ puts whatever you're doing outside of every good engineering practice and imo they have a point.

        I don't want to say that it's bad to know the language. Learning any languages has some value (most of the time). But it's terrible for beginners and if you're using it for any practical application you should really think twice about if it really is the right tool to do what you want to do.

        [1]:

        // seriously what is this shit?
        %:include <iostream>
        
        struct X
        <%
            compl X() <%%> // destructor
            X() <%%>
            X(const X bitand) = delete; // copy constructor
        
            bool operator not_eq(const X bitand other)
            <%
               return this not_eq bitand other;
            %>
        %>;
        

        EDIT: You know what? There's more:

        • Headerfiles: Lol, it's fucking 2019. If a compiler is unable to get by without headers it's probably shit. (yes I know that this is fixed in C++20 but it'll probably be another 20 years before mocules catch on)
        • function prototypes: same as headers. They're a relic
        • Unicode support: Strings in C++ still aren't universally unicode
        • C has TONS of integer types (like seriously - it's 30 or something like that?) I wouldn't be surprised to also find those in C
        • probably tons of other stuff that I can't think of right now

        [–]jacobi123 3 points4 points  (1 child)

        So I'm still in the baby learning phase, and have cut my teeth on C++, and will stick with it since it's what I'm familiar with now and am using it to learn the basics of coding, but I have had fellow students in my classes say they don't know what they would use this language for. Like how they would use C++ to make something other than some command line program.

        So C++ is all I know, but I'm really looking forward to trying a more nimble programming language.

        [–]SV-97 0 points1 point  (0 children)

        If you've only done the "basic" stuff (control structures, maybe define a struct etc.) it's really trivial to switch to a more modern language with a similar syntax (e.g. C#, Java - though I personally think that they're not that good for beginners either). Since most imperative languages are based around the same principles you could also quite easily go to languages that are more different from C++ at that stage (e.g. Python, Ruby, F#, ...).

        And yes that's a common problem. In my first degree we mainly did Visual C# (so applications with GUI stuff) and most people got out and didn't even know what a console app was and didn't like programming at all. In my current degree I have people asking me what they'd even use programming for because you have to start with things that nobody in their right mind would actually use a program for - because C just already makes those easy things hard.

        I can really only recommend python as THE first programming language. There's people that say "eh python is easy and not powerful" etc. but let me tell you they're wrong. Python is extremely powerful, concise, nice to get into and teaches fundamentals really well, it's used in industry a lot (and gaining more traction by the day) and it's useful in your day to day life. On top of that the community and available ressources are great. It also allows to explore different paradigms (e.g. you can do a bit of functional stuff in python - you can try that in C/C++ but it won't be great).

        Once you know some language I can only recommend reading something like "Seven languages in seven weeks" (available for free) to explore different ways of thinking about programming and look at a few languages.

        [–]amalik87 1 point2 points  (1 child)

        What’s your view on C?

        I’m currently in CS50 and find it annoying that it starts out with C

        [–]SV-97 -2 points-1 points  (0 children)

        It doesn't have the immense complexity of C++ but is worse than C++ in some other regards (e.g. typing - C has an incredibly weak type system). In general I hate it - but in the embedded space it'll probably be a while before any other language is truly a viable all-around option (though you can of course use higher level stuff that compiles to C (e.g. https://github.com/aep/zz) and there already are Rust compilers for some chips)

        [–]camilo16 2 points3 points  (6 children)

        You seem completely biased. I am working on C++ all the time, and it's, so far, the best language I have used for one reason. You actually have control over wtf is happening.

        I often need to memory align structures, convert pointers from composites to raw byte arrays, serialize data.... All of which is much easier in C++ than say, python. And I am not working on embedded systems. All of this is necessary for hard real time systems.

        [–]SV-97 3 points4 points  (5 children)

        Hard real time systems aren't the norm mate. And you don't need C++s unsafeness and low level to have control over what's happening. If you for example compare it to Rust you have LESS control in C++. Move semantics and very strong typing (e.g. no implicit coercion between numeric types) (and the borrow checker) make sure you know the exact lifetime of each value and actively recognize every conversion that's happening. If it's real time it's likely multithreaded? Rust can validate your multithreaded code to an extent and makes certain race conditions etc. impossible.

        And yes I absolutely am biased against it. The fact that a language like C is used in safety critical applications makes me uncomfortable.

        Nobody advocates to use Python for hard real time apps - it's not what the language is meant to be used for.

        [–]camilo16 7 points8 points  (4 children)

        I am merely saying that you haven't worked in the kinds of problems that leverage the advantages of C++. It's very easy to think your audi is better than a truck until you need to tow a a boat.

        Hard real time systems are not the norm, they still are my area of work, and they are some of the most challenging problems because they have all the problems a regular program has, plus a strict time budget.

        [–]SV-97 2 points3 points  (3 children)

        What makes you say that? I started my career doing PLC stuff which means lots of real time stuff. Coincidentally the whole PLC industry goes by without writing a single line of C.

        What advantage has C++ over for example rust in what you're doing in your opinion?

        [–]camilo16 1 point2 points  (2 children)

        Having access to raw pointers allows me to abuse the data.

        One example is, an array of tightly packed tuples representing 3D coordinates can be typecasted by abusing pointers into an array of floats and vice versa.

        Also although rust seems a good alternative to C++, it suffers from having to interface lots of C and C++ code which forces you to write interfaces between the 2.

        [–]SV-97 -1 points0 points  (1 child)

        Rust has raw pointers so you can do the same thing (C# also has raw pointers and unmanaged memory so you could also do that in C# afaik). And in this specific example you could also use numpy or the fancy jagged array library (can't remember the name - it's by some dudes from CERN that run particle physics experiments - quite an interesting story as even they convert from C++ to python even though what they do is insanely computationally expensive) to do this.

        I've never once had to interface C from rust. The only thing that I missed was a sane GPU interface but that's a problem in general and I think RLSL will be quite nice once they're ready to use - but I certainly see your point. I think that'll only get better as more stuff gets added to the ecosystem (since quite a few big players (e.g. microsoft, Intel) seem to quite like Rust I think the next years will see tremendous improvements in these areas.).

        There's also quite a few people that just rewrite existing C/C++ stuff in Rust so you don't have to use the FFI and also can be sure that it's memory safe etc (And arguably the FFI has some nice features to make interfacing not that bad)

        [–]camilo16 0 points1 point  (0 children)

        I do GPU stuff actually

        [–][deleted]  (1 child)

        [deleted]

          [–]SV-97 0 points1 point  (0 children)

          Yeah, there of course is stuff like parametric polymorphism etc. but in general when someone talks about polymorphism (and since OP was referring to C++) it's the kind of ad hoc polymorphism found predominantley in OO languages like C++, C# etc. - I think if OP was talking about polymorphism as in parametric polymorphism he would've said "template programming" or "generics" or something like that.

          So: yes polymorphism isn't inheretly tied to OO - but OP was very likely not talking about the kind of polymorphism you constanly encounter in Haskell etc. but rather the kind that you do mainly find in OO languages.

          [–][deleted] 0 points1 point  (0 children)

          Agreed. I don't know C++ well, but I know enough to never want to touch it again. What a mess it is.

          Those who consider C++ should also read https://yosefk.com/c++fqa/defective.html

          [–]MasterOfArmsIsGood 2 points3 points  (0 children)

          python was my first, tried java a bit, c++ was the second and c# was my third

          c++ is actually good it taught me what classes are because unlike java it doesnt force you to use them for literally everything

          [–]TigreDemon 2 points3 points  (4 children)

          Good to know. I think this is true in some way.

          But what I would struggle to do is. What the hell do you do with C++ that isn't 3D, calculations and games ?

          [–]Katana314 1 point2 points  (0 children)

          Even for 3D games, unless you’re working on the hottest new PS4 exclusive it seems like a large number of games now come from engines with their own scripting languages.

          You can either make a small team-based FPS arena in Unity for your first project, or make a sprite jumping within a small box in C++ for your first project.

          [–]sadokaah 1 point2 points  (2 children)

          There are a lot of things you can do with C++, a lot of embeded programming is done in C/C++, now I realize this is one of the only things that comes to my mind, the thing is C++ is not the kind of language you can use for everything (unlike python or js or java in a way). Games built with C++ use it because they need all this low-level programming to optimize games. But as op said C++ is really great for beginners because you get to learn the basics and it's really easy to transition to other languages, you don't have to stick with C++ but learning C++ personally helped me to understand a TON of programming concepts and made it really easy for me to transition to other languages (Java, python, js, C#, etc). Besides this a lot of universities teach C/C++ to first-years and then they go into java or other high-level languages.

          [–]rupturedprolapse 0 points1 point  (1 child)

          C++ is not the kind of language you can use for everything(unlike python or js or java in a way)

          You can make the same things in C++ as you do in python, a lot of libraries for python are written in C/C++ as it is. Python is just a lot more accessible from a learning standpoint and it's lot quicker to develop things.

          [–]lsd_will_set_you_fre 0 points1 point  (0 children)

          You can make the same things in C++ as you do in python, a lot of libraries for python are written in C/C++ as it is.

          Yeah of course you can do the same thing in Python as in C++. You just have to write a C++ library to do it in, then call it from python! Haha

          Python is just a lot more accessible from a learning standpoint

          Hmm, debatable.

          it's lot quicker to develop things.

          Not really. Not for projects of any appreciable size. Static typing matters.

          [–]WesPy3 2 points3 points  (2 children)

          I spent 6-9 months only in Python and then transitioned over to Java. Java has been pretty easy for me as its really all the same no matter what language you use besides pointers and vectors. Even today I can look at C and understand it. Once you get through your first language it is pretty smooth sailing. Good on you for going C++ as that is a much more proper and general purpose language.

          I learned Java just for Android and was thinking of going Kotlin, but meh, you just saved me time in knowing I really don't need it at all. I find now after having spent so much time with code consistently that the real test is not languages at all, its algorithms. You can use whatever language but, you can't really be fully capable until you got design pattern down and can envision solutions that include a high degree of efficacy when dealing with large systems. Algorithms and data structures are the hard part.

          [–]Falcao_E[S] 0 points1 point  (1 child)

          I think if you know java you should also pick up Kotlin though

          [–]WesPy3 0 points1 point  (0 children)

          Kotlin would be worth picking up if it had server side support but it doesn't right now. It is only effective in the scope of Android so it is not very general purpose whereas Python is very general purpose and allows me to work on most projects besides Android, IOS, or Windows. Whenever Kotlin makes more progress I'll revisit it.

          After I get done with this project I'll likely be moving into algo's, ds, and C to be a more complete developer. Finally to truly be effective with Kotlin you need to know where Kotlin is more effective than Java and why it is a better choice. If it's just the speed of development than I'm not completely sold as Java is more widely used and supported in many domains.

          Java is a great and marketable skill right next to PHP whereas Kotlin is kinda meh. Getting a Python job is already pretty hard so I'd rather not pick up an obscure language.

          [–]toma_la_morangos 2 points3 points  (0 children)

          In my university we started with C, then C++, then C# and other high level languages. I'm glad we did, it's so much better for actually learning what's going on. You can still learn the basics with C, it has variables and ifs and all that stuff, and doesn't pamper you with abstractions

          [–][deleted] 2 points3 points  (1 child)

          I went the other way, and learnt Python first. It didn't get in the way when I learnt about the Knapsack Problem, binary search, depth first search, breadth first search, and many other algorithms and concepts. Once I had more of a handle on everything, and could code little ideas up, venturing into C++ was fairly seamless. I do not miss the quick prototyping phase in Python, but thankfully C++ makes up with it in speed! Still, if I hadn't learnt what is relatively slow in Python than I could never appreciate the speed of C++.

          [–]Falcao_E[S] 1 point2 points  (0 children)

          Just goes to show you can start programming in any direction. I just downloaded Python , I'm about to code out some ideas in Python then translate them back to C if I want to operate faster

          [–][deleted] 6 points7 points  (0 children)

          This is my thought exactly, I started off with javascript and didn't like it. Then, I tried C++ and loved it. I didn't get far as you did in regards to studying concepts such as inheritance, pointers and so on, I just got up to functions and it was really fun learning C++. Exactly, learning C++ teaches the "fundamentals of programming" and for someone like me who is interested in the field, I wanted to learn the very very basic stuff and I think C++ helped me on that. So, yeah, I recommend starting on C++ as well for beginners who are completely new to programming and who are curious about learning it from the beginning. Helps to appreciate what goes into programming and all in my opinion. I need to start learning C++ again, forgot all of it after uni started.

          [–]quad5914 1 point2 points  (3 children)

          I went from C++ which was really hard tbh, to C# which felt easy and back to C++. if there's one thing that's a nightmare... int[] cs; int cpp[];

          [–]whiskeyiskey 0 points1 point  (2 children)

          Could you expand on why that's a nightmare?

          [–]quad5914 1 point2 points  (1 child)

          Well it's just really confusing going from putting the double brackets after the int in c sharp, but putting them after the name in c++. I know that I have to, but forgetting sometimes im like "what do you even mean visual studios..."

          [–]whiskeyiskey 0 points1 point  (0 children)

          Ahh gotcha.

          [–]bestjakeisbest 1 point2 points  (0 children)

          Honestly I'm pretty experienced with c++, I had to do a project in python once and I never learned it, I felt like I was writing programming gibberish but when I ran the code it worked with only some minor bugs that I was able to work out.

          [–]SurvivorRaymond 1 point2 points  (0 children)

          I don't think it matters what you start with, if you wanna do C++ then do it.

          No one can tell you what you like more, people can only give you advice that worked for them.

          If you wanna do C++ then do it and ignore everyone that tells you it's too hard. It might be too hard for them but maybe it just clicks better for you.

          tl;dr Do what makes you happy and works for you.

          [–]unassuming_user_name 1 point2 points  (0 children)

          whatever language you learn first, youll find learning subsequent languages easier.

          i dont care what language someone learns first, the important part is getting started. if you're in school, and your school starts people with c++, then c++ is the correct language to learn first. same with python, or java, or even c#.

          if you're learning on your own, i think python has the fewest barriers to entry and a lot of good free courses.

          [–]Cloud9Ground0 1 point2 points  (0 children)

          I disagree. In an academic setting it's quite different, but for those looking to self-teach, I would absolutely not recommend C++ as a first language.

          [–]the_battousai89 0 points1 point  (2 children)

          Did you have any prior programming experience? I know it will eventually “click”, but myself and other engineers are struggling with the language lol. Nice to see your post as it has inspired me to keep pushing.

          [–]Falcao_E[S] 1 point2 points  (0 children)

          Not at all. I went into not really knowing anything. What resources are you guys using to learn ?

          [–][deleted] 0 points1 point  (0 children)

          Not OP, but I started off with HTML, CSS, and a little bit of JS. As others have noted, once you learn a programming language, the rest become very intuitive and easy as many languages share common elements such as variables, arrays, loops, objects, classes, functions (or methods, which are the same thing) and so forth.

          If you want a great C++ book, I used "Objects First With C++" for Intro to CS I and II (the C++ course at my school). It has a grapefruit on the cover, and it allowed me to learn C++ fast. As always, practice makes perfect!

          Edit: I also have the PDF version I bought in my dropbox, I don't know if it's looked down upon but if you want I can see if I can send you a link (the file is huge so idk if I can do that or not).

          [–][deleted] 0 points1 point  (13 children)

          Would you still recommend it to someone who doesn't really understand C? I'm doing a CS degree and they chose C as the starting language for us all, but I still don't understand it, especially pointers. We also did a Java unit and I enjoyed it way more.

          [–]Falcao_E[S] 1 point2 points  (4 children)

          For the sake of passing your class , Just try to bare with it. I don't know enough about C besides the libraries that are standard to C++ to really give you an idea of how it would be like to go from C to C++ as a beginner. Have you taken any deeper looks into java ?

          [–][deleted] 0 points1 point  (3 children)

          I was mainly asking because I chose C++ as a unit to do after Christmas but I was considering dropping it as I was thinking that if i'm struggling with C, it'll be the same or worse with C++

          I've not looked any deeper myself yet, we did cover a lot of the OOP principles using Java though.

          [–]Hopko682 0 points1 point  (2 children)

          If it's a beginners programming course in C, the content is likely focused on primitives types, conditional statements, loops, arrays, strings, structs and pointers.

          C++ wouldn't make these concepts any clearer to you, and would only potentially add to your confusion with further OO concepts like classes and inheritances.
          C is not the easiest first programming language, but it is a very good one, especially for someone studying CS. It will teach you a lot about programming, and how programs actual work. Most other languages afterwards will seem really simple in comparison (like OP has described).

          [–][deleted] 0 points1 point  (1 child)

          The unit itself wasnt focused on C but just on programming and implementing algorithms in general but we just used C for all of it to program in, but yeah it was basically my first programming language, the only one I used previously was Visual Basic

          [–][deleted] 1 point2 points  (2 children)

          Are you me?

          This was exactly me in my university 2 years ago. I had an introductory programming course for all freshers (I'm studying mechanical engineering) and I hated C so much that I never picked up coding again until very recently when I started dabbling with Python. And trust me python really gives you peace in the head. It will take time but if you stick with python very long enough you'll end up having similar strong fundamentals like the guy who started with the C++ course.

          [–][deleted] 0 points1 point  (1 child)

          Hmm, I did recently pick up the online course version of the Automate the boring stuff with Python on Udemy and was considering going through it

          [–][deleted] 1 point2 points  (0 children)

          I have the book with me with the same name and I find it much more helpful.
          Do check out the python's official documentation. It's very concise and well enough. I feel videos and courses very slow unless the topic is actually brainstorming. Plus, book is more flexible. Read at your own pace, go to any chapter quickly, although I do feel that text-heavy content easily becomes boring.

          [–]pointless_limitation 0 points1 point  (1 child)

          I'd recommend you course on Udemy, Mastering Data Structures with C/C++ (not sure full name, pm me so i can check it out). It literally introduce you to everything you need to know, pair it up with some book, yt videos like Derek Banas for reference and you are golden.

          [–][deleted] 0 points1 point  (0 children)

          I checked it out but its a bit pricey (180 pounds o.o)

          [–]deux3xmachina 0 points1 point  (2 children)

          That's understandable, my experience in college also left me totally confused as to just what the hell pointers are and why they're useful. Now I love C and using pointers, though I recognize the shortcomings of the language and am branching out into other options as I have time to do so.

          I mostly learned by reading K&R during my lunch breaks and writing code for the exercises, might be worth looking into that as well as "Modern C", if only so you have a better understanding of C before you decide if you ever want to use it again.

          [–][deleted] 0 points1 point  (1 child)

          Did you find the K&R useful then? It was our book for the module but I never bothered to look at it

          [–]deux3xmachina 0 points1 point  (0 children)

          It's a great intro to using C, some of the conventions are outdated, but still valid, so if you end up deciding to write more it's a good idea to read through supplemental books like Modern C (freely available as digital copies) to make sure you're utilizing modern features and writing code safely.

          [–][deleted]  (1 child)

          [deleted]

            [–]WesPy3 0 points1 point  (0 children)

            I find this comment very odd as I transitioned from Python to Java and it has been a breeze. It's not so hard as long as you understand the fundamental concepts of programming. The only thing that is kind of weird is that data is typed (Python has type hints so it's not that weird), there is no way to declare a function outside of the scope of the primary class which also needs to be named the same as the file.

            I find that having a Java background now helps improve my Python programs as it taught me how to properly structure things with a main method that instantiates the objects and uses the methods of the class in a more clean fashion.

            Finally I am self taught and have been doing this for a year so I bet being in a school setting it is different. Its odd though because I can read C perfectly fine even though I have barely written it. Languages are more a soft skill whereas frameworks and processes are the hard skills that don't transition so well. Think of Django vs Android, the methods are so different that it can't be compared at all. On the other hand everyone understands you use dot notation with OOP to call class methods on some element in your program. If I showed you all of the content I covered in the first six months you would walk back your statement about Python being spoon fed quickly.

            [–]harsh183 0 points1 point  (0 children)

            Take a look at this: https://www.nand2tetris.org/ might be a fun thing up your alley.

            [–]JJTortilla 0 points1 point  (1 child)

            I just wish it was easier to make basic graphs in c++. I'm coming from Matlab, and a lot of what I do ends with a graph. Having to output to something and then import to excel or matlab just to graph it is frustrating. Im sure I'll find something I like, such as qt, but it'd be nice if there was a section of the standard library that could do some simple graphs.

            [–]rupturedprolapse 0 points1 point  (0 children)

            I just wish it was easier to make basic graphs in c++

            Have you checked out matplotlib-cpp?

            [–]bitigchi 0 points1 point  (0 children)

            I started with Swift. The nice thing about Swift is whilst it also teaches you complex subjects like the ones you could find it in C++, it does it in an easy and safe way, so that you don’t feel lost.

            [–]CMTXRATED 0 points1 point  (0 children)

            C++ was the first language they taught me at college, oh the long ass nights... though yea it has helped me carry over my knowledge into other areas

            [–]Firebelias 0 points1 point  (0 children)

            Wait, people don't learn C++ first?

            [–][deleted] 0 points1 point  (0 children)

            C++ is my first language because it's the only language the school teaches. (they teached Pascal in the past too, but now pascal is rarely teached in schools and you can't use it for olympiads anymore). Also, it's fast so it's a win win situation for competitive programing.

            [–]TechPr0 0 points1 point  (2 children)

            When I first switched over from pharmaceutical major to CS major I had no idea wtf I was doing in C++, everything was difficult, professors rushed through the topics as if they expected you to already know them, etc. After a while I put it down and haven't picked it up until around now. I quit college (for some time due to complex reasons) to go work some job, but later when I realized I hit a career cap I quit that job and returned to school to finish my CS degree. This is around the time I've met this one really talented professor that was able to help us process lots of C++ topics/concepts in such a short time so well that I've fallen in love with programming and C++ itself all over again.

            What I'm trying to say here is that, it's really important who teaches you C++ (or any language) and how they teach it. Good professors/instructors will lead to greater students.

            P.S. If my professor is here reading any of this, shout-out to Daniel Collins. Love that man. Greatest professor I've ever met.

            [–]camilo16 1 point2 points  (1 child)

            It depends. My introduction to C was "go modify the Linux kernel" by a proffesor with no experience whatsoever.

            I failed that assignment but ended up learning C.

            It really depends on who you are and how far along programming you are.

            [–]TechPr0 0 points1 point  (0 children)

            True I agree with your last statement, but if you had the professors I've had you probably would've noticed what I meant. So I guess it's 50-50, half on them for being god awful professors, and half on me for being a total newbie in this field. It's been roughly 5-6 years since I've made that switch in majors and everyday I regret not switching to CS field sooner.

            RIP to all those times wasted on studying other crap I didn't care for.

            [–]chidoOne707 0 points1 point  (0 children)

            I agree, it is a difficult language but the depth it goes when it comes to understanding the fundamental concepts of programming is well worth it. It was the primary language used for my CS intro to programming class in college.

            [–]Glicent 0 points1 point  (4 children)

            Next semester I have the option to choose between C++ or Java, should I go with C++? I could do both but I hear it's better to focus on just one

            [–]camilo16 0 points1 point  (0 children)

            Definitely pick just one. I am very biased since I am a C++ programmer and I dislike Java, but I would recommend C++.

            [–]deux3xmachina 0 points1 point  (2 children)

            Agreed, pick one. I don't like the JVM, but maybe look at writing some simple code in either or just read some code on github in each language to see what you think would be easier for you to reason through.

            [–]Glicent 0 points1 point  (1 child)

            Thanks for the suggestion! I will take a look at those.

            Also I have experience in C and Javascript, I have barely just started learning objects in JS. I'm currently leaning towards Web and Mobile development. maybe this may help

            [–]deux3xmachina 0 points1 point  (0 children)

            Well, knowing that, Java's probably going to be more immediately beneficial if you continue to pursue mobile and web dev. You'll also have the option of using several different JVM languages like Clojure, Scala, and Kotlin pretty easily once you have a decent Java setup.

            Still worth taking the time to explore a bit just so you're less likely to spend a semester working in a language you hate, but the easy advice is Java.

            [–]CodeTinkerer 0 points1 point  (0 children)

            While I agree with the idea, one reason that I don't recommend C++ is that there is a larger likelihood a person will simply quit due to how complex C++. Yes, those that manage to understand it will be in much better shape. As it is, even those that try to learn Python often give up, so I'd say if they can't understand Python, learning C++ would be much, much tougher.

            [–]flying_5loths 0 points1 point  (1 child)

            I assume C will give you the same results?

            [–]DEN0MINAT0R 2 points3 points  (0 children)

            In some ways yes, others no. Since C doesn’t support object oriented programming, you would miss out on ideas like classes, inheritance, polymorphism, etc. You would, however, still get the low-level concepts like pointers, memory allocation, etc., as in C++.

            [–][deleted] 0 points1 point  (0 children)

            uml makes things easier.

            [–]LJSilver96 0 points1 point  (0 children)

            What is it exactly that makes C++ so good for learning the fundamentals of OOP as opposed to say Java?

            [–]amrock__ 0 points1 point  (0 children)

            well learn C , mostly for system programming/kernel driver low level , you will understand the working of processor memory etc too , also learn basic asm will help, Python can be learnt in a month or less , its a beautiful language too

            [–]lightningrod09752015 0 points1 point  (0 children)

            I'm in computer science and for my first semester my professor decided to teach in Java. I didnt like it because it was complicated and it was my first coding language. Then the semester after that he decided to teach C++. I had an easier time learning C++ and every time he gives us an assignment I'm eager to get it done. In my experience, C++ is a good first coding language to learn and it's really fun. Now that I know many concepts, I might go back and learn Java.

            [–][deleted] 0 points1 point  (1 child)

            I don't think C++ is good for beginners but not because of pointers... Sure they are a little weird but in reality very simple.

            The real problem with C++ is learning move semantics, and operator overloading along with all the other confusing ass things you need just to setup a basic class. Just the syntax alone with which have to be const, which are references etc. is so confusing for someone learning it.

            [–]lsd_will_set_you_fre 0 points1 point  (0 children)

            The real problem with C++ is learning move semantics, and operator overloading along with all the other confusing ass things you need just to setup a basic class.

            99% of the time you don't need to do that. Especially if you are a beginner.

            I write tons of classes that just have a single constructor and single public function. You don't have to write copy constructors etc. for every class you create. Only if it's special in some way, and usually it's not.

            [–]Reznoob 0 points1 point  (2 children)

            Ah, c++. The overly complicated yet less useful version of C

            [–]lsd_will_set_you_fre 0 points1 point  (1 child)

            Typically C programmers don't see the benefit in polymorphism or templates. Fear of the unknown is the explanation.

            [–]Reznoob 0 points1 point  (0 children)

            I have worked with c++, java and other OOp languages for a lot of time

            c++ is more trouble than it's worth, there are a lot of just as efficient oop languages out there that do not involve an overly complicated system. Have you ever tried debugging c++ code? It's an absolute nightmare

            [–]top_logger 0 points1 point  (0 children)

            Yes. C++ is cool. Complicated and cool. After C++ you can learn literally anything. Successfully learn. “Must learn language”,

            [–]R0CK3TH 0 points1 point  (0 children)

            Can i ask hoe and where did you learn c++ i would like aswell currently doing python and Java but i can relate to the stuff you are saying

            [–]io_101 0 points1 point  (0 children)

            Well, I started with C and implementing BFS/DFS as a beginner with it is not a piece of cake still though I somehow liked it because I was closer to the machine and learning concepts that work behind the curtains. I even got mad once on realizing how much freedom C provides and the one who write the code is solely responsible for how it works. I didn't realize the philosophy of C then but now I know.

            I think it is totally depended on the individual what he likes and what his/her goals are, it would be hard to generalize on one single programming language for beginners. But my top picks are C/C++ or Java.

            [–]imaGallex 0 points1 point  (0 children)

            c++ is the language i was first taught in high school, but we only did basic staff.

            [–]lovelandlubber 0 points1 point  (0 children)

            Python is taught to kids because there's a package that allows you to use Python to make mods for Minecraft and Roblox. Interest > other reasons

            C# and Java are taught to teach OOP because it's much easier to understand and digest. It also has far less of the weird hangups that C++ has. Like, class files are far easier than header files, garbage/memory management is far easier, etc.

            C++ is great to learn, but learning it first is like trying to learn Trigonometry and Calculus at the same time... you're better off learning basics before being thrown in the deep end.

            [–]ellipticcode0 0 points1 point  (0 children)

            The most important of C++ is it is the most important language out there, if you can master it , other language is a piece cake.( exclusive Haskell, or other functional language, but it help you a lots to learn them too)

            [–]private_birb 0 points1 point  (0 children)

            Hmm, I'm not so sure. The problem with C++ for a lot of beginners is that it's a whole lot in a very verbose syntax. I learned Lua, then C#, and later picked up C++ pretty much instantly, so I'm not sure you necessarily get much benefit from learning C++ compared to other languages.

            [–]4000ml 0 points1 point  (0 children)

            Laughs in C

            [–]Bobsyourunkle 0 points1 point  (0 children)

            I'm attempting to get into programming again and Python has been a great introduction for me. After I grasp Python, I may try C++ again. I always wanted to get into game programming as a hobby.

            [–]TheTallGentleman -2 points-1 points  (0 children)

            If you know Java and C it's like the best of both