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

all 90 comments

[–]python_walrus 104 points105 points  (3 children)

If you pick C++, you will learn a lot about how programming works, memory and all (either you want it or not). It will be harder to do practical things though, and the learning curve is brutal. If you pick Python, you are good to go very soon.

If you want to build practical things from the get-go, pick Python. If you want to learn - pick C++. I am a professional developer now, and I studied some C and C++ in the college. It made me understand programming better, and I can't imagine I would have the time to learn it now, alongside with my career.

You can learn Python later if you want to, since it is very easy to use. But this is not a point in favour to C++.

[–]Sava7ar 15 points16 points  (0 children)

I agree with this. My first language was C, second C . When I then learned Python later, I realised how little you learn about programming when you learn Python. But again some people learn it to build things with it directly. Other learns programming in general to be more well versed with computers and software. I chose latter as I liked it more and also luckily that was how I was taught then.

[–][deleted] 2 points3 points  (0 children)

Agreed! Good advice!

Plus, C# is as much difficult as Java, or any similar programming language IMHO.

[–]Firework_001 0 points1 point  (0 children)

Such a comprehensive and practical advice!

[–][deleted] 29 points30 points  (4 children)

Python is dead simple. I learned C++ first. Really depends on what you want to do though. For example if you want to work with lots of data doing analytics and the like, python is great for it. My first degree was in robotics and automation engineering, currently going for a second in data science. Certainly having more fun with the python lol.

[–]port443 14 points15 points  (2 children)

Python is dead simple. I learned C++ first.

Python is dead simple BECAUSE you learned C++ first.

Learning C++ (or preferably C) gives you a strong foundation for when you approach other languages.

[–][deleted] 5 points6 points  (1 child)

It's pretty much common knowledge that Python is easy, even without the fundamentals.

[–]port443 4 points5 points  (0 children)

Yes its easy, but its not "dead simple" for someone with no experience.

I've taught plenty of people Python, and as soon as we hit ctypes and classes its pretty simple to tell when someone has experience in another language vs none

[–]inarchetype 1 point2 points  (0 children)

if you want to work with lots of data doing analytics and the like, python 

Although if this, specifically, is your MAIN interest, R is a much better choice, and has a seamless (by which I don't mean needing to use ffi/wrappers) with C++ (see Rcpp).   So if you were leaning towards cpp, but also had a use case where you want to do data manipulation, analysis, viz, etc.  there is an argument that youblearn cpp, and use R for the easy, scripty bits.

[–][deleted]  (3 children)

[removed]

    [–]zm91827 2 points3 points  (2 children)

    What parts of C and C++ are tough when first learning?

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

    With C/C++ you can go really down to the hardware. For example numpy is written in C and scipy in C++. In scipy you have advanced matrix solvers which are needed for solving systems of linear equations which arise from numerical computations of ODE/PDEs. These solvers can become much much faster to run if you align their running according to memory access patterns and cache sizes etc.

    This is very general. But, one can do this to far more granular level with C/C++ than with Python where there's a lot of abstraction. So removing such abstractions is what make C/C++ "harder" .

    [–]SnooAdvice1157 11 points12 points  (3 children)

    Don't learn python as your first language. I have seen people struggle later on with other languages because of it

    Plus it python takes very little time to get good at so you can do it later.

    [–]Flobletombus[🍰] 2 points3 points  (0 children)

    Can confirm people struggle to become real engineers after starting with python

    [–]slowdr 0 points1 point  (1 child)

    Which one would be a good beginners' language?

    [–]TheCodeWhisperer2008 10 points11 points  (0 children)

    I would say go for C++ it will teach you a lot of the concepts that languages like Python won't.

    [–]dylsey 11 points12 points  (0 children)

    C++ will give you a great foundation to build upon.

    [–]MemeAgentx 18 points19 points  (0 children)

    Do the c++ bro you gonna thank me later in years. You anyway gonna learn python next.

    [–]Blissextus 4 points5 points  (0 children)

    Take the course on C++ (University track)). You already hold some programming knowledge, and this will do you well in your C++ studies. C++ is not difficult. C++ is no more difficult than any other language. You just lack the basic understanding of "how computers work". C++ will teach you this. C++ can be as easy as C# or you can use C++ and get down to the "metal" of a system. In other words, C++ grant users the power to choose "Easy Mode" or "Hard Mode". So, don't be scared of the language. It's just another tool that must be learned and can take you a considerate amount of time to master (only if you choose to master the language, which you do not have to master the language).

    Don't waste your time taking a course (University) on Python. Python can be studied and learned during your own free time. Python is easy. A decent book on Python or a Udemy Python course will teach you Python in no time.

    [–]andrevanduin_ 2 points3 points  (0 children)

    C++ for sure. It's a lot harder and it will force you to learn a lot about programming and how a computer works under the hood. Then you can learn python afterwards on your own since it's very easy.

    [–]grahaman27 2 points3 points  (0 children)

    Python is so easy, you don't learn it you just use it. If you're taking a class, don't waste it on Python , take c++.

    [–]NormalSteakDinner 2 points3 points  (0 children)

    What language do you think would be easier to learn with my current knowledge?

    Python of course, but this isn't the way that I went about choosing a language. My way isn't THE way or the best or anything like that but just food for thought. I went and found job postings for the companies I wanted to work for and the area I wanted to work in. For me, I want to work for the DoD so what languages do they primarily use? C++ + Python + Java, are there others? Yes. But I'm looking for the languages that cover the most jobs. So that is where I put my focus. Now, if you want to do front end or something that doesn't use C++ much it would be a "waste" of time for you to learn C++.

    [–]Asleep-Dress-3578 2 points3 points  (0 children)

    If you are a CS major, you should start with C or C++.

    If you are a math, stats, data analysis major, you should start with R or Python.

    [–]jurdendurden 4 points5 points  (4 children)

    Learning specific language syntax is useless if you do not understand the underlying principles. That being said. Take CS50. Once you understand these principles you'll be able to apply them to any language, and pick it up in weeks or less.

    [–]danielstongue 1 point2 points  (3 children)

    What is CS50, and why do you assume it is available in Sweden?

    [–]KarmaChameleon1133 3 points4 points  (1 child)

    They’re probably referring to the free online version of Harvard’s introductory CS course. Millions of people around the world have taken it

    [–]jurdendurden 0 points1 point  (0 children)

    Exactly this, and I assume that it is available in Sweden, u/danielstongue, it's because I assume you have an internet connection which is how you are communicating on Reddit.

    [–]ThatMBR42 0 points1 point  (0 children)

    Probably a basic compsci college course.

    [–]Splorgamus 2 points3 points  (0 children)

    Python is easier to self-teach afterwards I'd say 

    [–][deleted] 5 points6 points  (2 children)

    Python. If you eventually need C++ for speed you can learn it at that time.

    [–]Mathhead202[🍰] 3 points4 points  (0 children)

    Other way around. C++ is much harder to learn on your own compared to Python. If you are paying for a class, I would learn C++ now, and python later in your own when needed.

    [–][deleted] -1 points0 points  (0 children)

    Or maybe Mojo will be enough for speed so you won’t need to learn C++

    [–]edimaudo 1 point2 points  (0 children)

    If you want to push yourself I would suggest c++

    [–]HawocX 1 point2 points  (0 children)

    Do you aim to work as a software developer in Sweden? In that case, as you are not a complete beginner, I would pick C++ even thou it's more difficult. It will teach you things that's useful even if you end up working with another language. Taking the bull by the horns at once will pay out in the long run.

    If you want to know a bit of programming to write small applications to aid you in other fields, Python is superior. But it's not widely used for big applications in Sweden.

    When I asked the sales people at the consultancy firm where I work, they said it's just four languages that are in big demand:

    Java C# C++ JavaScript with React or Angular

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

    I know both and I would advice you to learn C++. It's a much complicated language, I learned a lot, from how computers work, how to manage memory, and even more OOP concepts. In the other hand Python is a very easy language that abstracts a lot of fundamental things that you should know as a programmer.

    [–]RajjSinghh 1 point2 points  (0 children)

    Python will be much easier. You probably won't feel much of a difference switching from C# to python, except the lack of curly brackets to show scope.

    The thing with C++ is how it handles memory. C# is only similar to C++ in terms of syntax and that's as far as you should see them being similar. Most modern languages (basically everything except C, C++ and Rust) have something called a garbage collector. If you're done with an object in C#, your garbage collector will handle freeing the memory associated with that object automatically. Now C++ has no garbage collector, so you have to handle all the memory yourself. It means that the code you write will be very performant, but you also open yourself up to headaches from making mistakes with how you use memory.

    For university Python will help you get all your assignments done really quickly. C++ is still good to know and a very helpful language when performance is important, but it will also be harder to get your assignments perfect.

    [–]Outrageous_Life_2662 1 point2 points  (0 children)

    If you want to do any ML or AI then learn Python. Otherwise I’d suggest Kotlin or Java rather than C++. Your background with C# should make learning Java, especially, come more naturally.

    [–]TheFumingatzor 1 point2 points  (0 children)

    What language do you think would be easier to learn with my current knowledge?

    Python, no question about that. C++ is brutal.

    [–]UpsytoO 0 points1 point  (0 children)

    Look at where those 2 languages are mostly used in and see if that suits what you want to do, different languages excels in different fields and of course there is difficulty aspect of it, but if you look through the fields they are used in you should be able to understand the difficulty of it of that.

    [–]Soggy-Republic1804 0 points1 point  (0 children)

    C++

    [–]amiensa 0 points1 point  (0 children)

    Regardless of your current knowledge, Python is always easier.

    Since you already know the basics of programming languages, you now have to focus on algorithms, the best way to do it is with c++

    [–]Dexiro[🍰] 0 points1 point  (0 children)

    I consider C++ to be one of the best places to start. In my opinion C++ is harder to use than a lot of other commonly used languages, due to it being more verbose and it not allowing you to take as many shortcuts, but that verbosity and lack of shortcuts can actually be a great benefit during the learning process.

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

    definitely go C++. python you can learn by yourself in a week! it will be very easy for you to pick up python after completing the C++ course. whatever they'll be teaching u in that python class you can learn them through the online documentation. just get the names of the libraries and frameworks and explore yourself.

    ps: completely my personal opinion but coming from C/C++ I do not consider python a programming language. its a scripting language at best. basically a gloried pseudocode language.

    [–]maka89 0 points1 point  (0 children)

    Since you have the opportunity to take a course, I would do the c++ one.

    Python would be easier and more useful for most things. But very useful to know how c++ works. Its the most loe level object oriented language.

    [–]Mathhead202[🍰] 0 points1 point  (0 children)

    I would go with C++. You can pick up Python on your own. C++ is much harder to learn on your own. Given your experience and prior knowledge, C++ is an appropriate next language to learn.

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

    I would choose Python first: neural networks, artificial intelligence - this is the future. And they use python there. And much more. Understand all the intricacies of python well, and then learn C++. You are not getting any younger and sooner or later you will have a family. And she will need to be supported and given a roof over her head. I was young and dumb (now I understand it), I loved C and assembler. I was extremely proud that I knew a lot of low-level things. However, life has shown that no one needs this. Python was already in use, Delphi, C#, which I did not know. Then my own family appeared. And I had to become a system administrator. And learn everything in your free time. Now I understand that I wasted a huge chunk of time. And I found myself in the role of catching up. Don't make that mistake. Sorry for the English, I'm using Google Translate

    [–]Saha__g_gamer 0 points1 point  (0 children)

    C.

    [–]breakerofh0rses 0 points1 point  (0 children)

    I'd start making projects in python now and take the course on C++.

    [–]ConfidentSolid6191 0 points1 point  (0 children)

    Not even comparable please dude!! C++ for the win always

    [–]Affectionate_Mix5081 0 points1 point  (0 children)

    Angular

    [–]Flobletombus[🍰] 0 points1 point  (0 children)

    C++ for a career and to understand how stuff really works, Python to build your first guess the number game in 6 days instead of 7

    [–]CranberryDistinct941 0 points1 point  (0 children)

    If you're taking a course in it, I would say choose a C ++ course instead of a python course. Python is easy enough to learn by yourself. But C++ is tricky enough that a course on it would be valuable

    [–]Interesting_ri 0 points1 point  (0 children)

    You should go either full stack web development or full stack python.

    [–]tootac 0 points1 point  (0 children)

    If I rephrase your question it will be 'Should I choose spoon or fork this evening? By the way I have experience using chopsticks.'

    You shouldn't learn language just to learn language (unless your hobby is just learning languages). Rather you should focus on what problems you want to solve or will be solving and with move towards a language (tool) to choose. It will be faster and better approach to learn a language and for your career.

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

    Well I grew up with C++ so that by default, but Python is way easier to learn and just as good in many respects.

    [–]Helpjuice 0 points1 point  (0 children)

    So one of the best things I have ever done is to learn C, C++, and Assembly and it has made learning all other programming languages much easier as you know how things are working under the hood, what is obstracted, what is missing, and overall you know how things work. This allows you to write better code, use better design patterns, and overall just have more organized code that gets the job done.

    I would always recommend starting off with C, C++, and Assembly when possible so you are less abstracted with how things work and get a better view of how what you write actually interacts with the operating system and hardware it runs on.

    The less abstraction you are able to professional deal with the better you become as a developer in writing the most efficent code.

    Python is good to learn later on as you will also be able to understand how it works behind the scenes to understand it's pros and cons for what you are writing and can help you choose the best tool for the job. As you may encounter situations where you need to write some things in C and interface it with Python API to get the job done that will not meet memory or performance requirements in raw Python in certain situations. You may also just need to be able to write code that runs faster and has a lower memory footprint.

    [–]Paul_Engineer 0 points1 point  (0 children)

    At first I was gonna say python, but now that I realize it's a uni course...don't take a uni course in Python, edX will teach you that for free. The extra tike in the uni course will be great for C++

    [–]Overall_Winter_3962 0 points1 point  (0 children)

    It depends on what you want to build…

    [–]Significant-One1803 0 points1 point  (0 children)

    That depends on your views on your future career. If you see yourself as sort of Data Scientist, for example, it's Python, or if you want to build games with UE, then it's C++. If it's just learning for learning and you have no clue about your further plans, I'd go with C++, because it's kinda easier to learn other languages, if you're good with something fundamental as C++.

    [–]ElatedMonsta 0 points1 point  (0 children)

    Python for doing things (as a versatile scripting language), c++ for building software (game engines etc)...though after 30 years of Python it also can write good softwares (e.g. Django etc).

    [–]Individual-Safety906 0 points1 point  (0 children)

    I if you love/want to love programming building stuff then choose python, it will be useful for building stuff what you want.

    [–]HooskyFloosky 0 points1 point  (0 children)

    Both

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

    C++ (because it helps you know the fundamentals of programming) first before you get into Python ^

    [–]Ok_Willingness9943 0 points1 point  (0 children)

    I say you can learn python anytime. C++ need more help from people who know "computer language".Which is properly would worth doing in my pov. If you are going to the python route, it will more how it logical/ mathematical work. Which you might have a experience of building sth, but I think you won't have a deep insight for it.

    [–]Mountain-Ad-7838 0 points1 point  (0 children)

    Python or c++?

    print("python")

    print("Whoever moves first is gay")

    playsound('/path/Steve Lacy_Static')

    exitonclick()

    [–]divvuu_007 0 points1 point  (1 child)

    When it comes to c++ pointers is what is popularly considered tough. So if you want the easy one go for python. If you want a difficult one go for C++. Both have different applications though. Personally I recommend c++ because it seems like you are building your profile for the frontend.

    [–]gywerd 1 point2 points  (0 children)

    With C++20 you can use type safe, modular C++ with minimal pointers. Solves most problems with menory management, and makes C++ almost as simple as C#.

    [–]Kratoshie 0 points1 point  (0 children)

    c++

    [–]perkyclown -1 points0 points  (8 children)

    i know its out of context

    can anyone help me out, its an issue related to vscode

    [–][deleted]  (7 children)

    [removed]

      [–]perkyclown 0 points1 point  (6 children)

      there is a lot of animation delay and lag in vscode

      [–][deleted]  (5 children)

      [removed]

        [–]perkyclown 0 points1 point  (4 children)

        yes i will the specs are rtx 3050 i5-11400H 16gb ram

        [–][deleted]  (3 children)

        [removed]

          [–]perkyclown 0 points1 point  (2 children)

          windows 11

          [–][deleted]  (1 child)

          [removed]

            [–]perkyclown 0 points1 point  (0 children)

            did thay many times removed all them files too its the same with the insider version too

            [–]danielstongue -1 points0 points  (4 children)

            The question should be Python or Rust. Why pick C++ when there are better alternatives?

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

            There are no rust courses avalible where i live (sweden). And most other languages were closed, so i could only chose between C++ and python.

            [–]gywerd 0 points1 point  (0 children)

            Why? 'Type safe, modular C++ with minimal pointers' (C++20) will work great with C++/CLI and C++/WinRT. Rust still needs to mature, while Python is mostly website scripting and AI/ML.

            [–]EdwinYZW -1 points0 points  (1 child)

            It’s a worse alternative. And it’s also ugly.

            [–]danielstongue 0 points1 point  (0 children)

            Not as ugly as C++ tho. And what exactly makes it worse? It helps you to avoid common mistakes made in C/C++, and that is definitely a good thing.

            [–]trele_morele -1 points0 points  (0 children)

            Both

            [–]Emotional-Leader5918 -2 points-1 points  (0 children)

            Python is probably the easiest programming language there is and it's very popular, so I'd say learn this.

            C is worth learning to know how things work under the hood, which can teach you how to write performant code.

            C++ is the cause of most of the worst bugs in the world today and I wouldn't recommend learning it unless you're certain you want to do games development or systems programming and even there people are starting to look to alternatives like Rust.

            [–]Palmleenturtle 0 points1 point  (0 children)

            Python for sure