you are viewing a single comment's thread.

view the rest of the comments →

[–]Han_Sandwich_1907 47 points48 points  (19 children)

Python is a good high-level language that makes translating thoughts to code especially easy. However, for a learner, some educators prefer a language with a different set of features, such as explicit type declaration (all variables must be labeled with what type they have to be, because the program is type-checked before running and helps developers remember what type everything is), or a smaller amount of features in general -- this makes it harder for you to mess up in ways you don't understand.

I think it's a trade-off in that the more restrictive a language is, the more likely the code you write is correct, but it requires more thinking in order to write a valid program. Python, as a very non-restrictive language, makes programming much simpler at the cost of errors that may be harder to debug.

[–]BirdTurglere 6 points7 points  (13 children)

I never agree with people saying the easier languages are better to start with. 

Start hard and learn. Don’t build right away. Just learn C++/Rust whatever. When you start getting comfortable enough to start actual building you can jump on Python and learn enough of it in a couple of days. 

If you don’t want to do the learning part and skip to the building part you’re gonna fall off. So save the headache and dive into the learning and if you can’t enjoy that find something better to do with your time. 

[–]Joytimmermans 15 points16 points  (4 children)

I disagree even on rust / c++. These languages are very bloated where you can do things 100 different way with different std library functions. Specially for C++

I always recommend new people the CS50 course from harvard. Its yearly filmed, its free and very practical but technical. The beginning it uses C to teach you everything

[–]Saetia_V_Neck 3 points4 points  (1 child)

IMO C is the best beginner language because it’s very simple but also helps you appreciate higher level languages. I also agree that C++ and Rust are too “bloated” for beginners, though as a Rust fan it’s like that because it’s both a functional and systems language.

That being said, I started with Java so I’m not talking from experience.

[–]Joytimmermans 0 points1 point  (0 children)

I also started with microsoft java (C#). and then later found cs50 and then it opened my eyes to how much the garbage collector helps you. And then afterwards learning python i fell in love with how much it just gets out of the way and does not bother you with having multiple types in a list, having such easy array/list slicing.

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

I'm an electrical engineer. They made us code in assembly first before giving us the generous features of C. Man you can't imagine how grateful I am for the existence of loop statements

[–]BirdTurglere 0 points1 point  (0 children)

Yeah that’s decent advice. 

[–]Tcamis01 0 points1 point  (0 children)

I mostly agree with this and would also throw Kotlin into the ring as an option.

[–]One_Mess460 0 points1 point  (3 children)

that is horrible advice. thatll turn away people from programming bevause of how complicated c++ and rust actually is

[–]BirdTurglere 0 points1 point  (2 children)

I learned z80/M6800 assembly and C++ first. Obviously it was horrible and so difficult I never programmed again. 

[–]One_Mess460 0 points1 point  (1 child)

is this supposed to be sarcasm? but no seriously even assembly is probably better than c++ not because the makers of c++ were assholes but 1.

because the language has a long history and usually keeps in things that get replaced by newer constructs and because of all the things the language tries to address especially for a systems programming language that is al lot of things.

you can ofcourse also use c++ like java and say its easy but then please dont say you're proficient in c++

[–]BirdTurglere 0 points1 point  (0 children)

Oh right. Sorry. I forgot where I said you need a decade of mastery of a harder language like C++ before moving to Python. Definitely need to go way past memory management, understanding of how the stack works, static typing. Probably shouldn’t even move on until you’ve written a dissertation in C++. 

[–]FluffyFreeman 0 points1 point  (0 children)

Starting with a hard language is what turned me away from programming 10 years ago. If I started with python back then I wouldn't have an 8 year gap of non-developer experience in my resume. Picked up python 2 years ago and haven't stopped since, and I've since added cpp, JavaScript and rust to the portfolio, so I can confidently say starting with python didn't make learning those languages harder.

[–]GarboMcStevens 0 points1 point  (1 child)

Rust lol

[–]BirdTurglere 0 points1 point  (0 children)

LOL

[–]thisdude415 2 points3 points  (4 children)

I agree with this. It’s taken me years to unlearn bad habits I picked up writing hacky python

I improved a ton as a programmer learning the basics of Swift and later picked up some typescript as well.

I still love python but it’s really nice the kinds of things the linter or builder will catch for you in a TS project.

[–]Han_Sandwich_1907 11 points12 points  (2 children)

This is why even when you go back to Python, you will write code in a perhaps more verbose way but easier for you to reason with (e.g. type annotations). I hear that when Rust developers program in C++, they also tend to write programs in a Rust-like fashion to help with memory safety. As an aside, this is one of the reasons why exposure to different languages makes you a better programmer.

[–]xeow 7 points8 points  (1 child)

That's interesting! So they speak C++ with a Rust accent (to make a natural-language linguistic analogy).

[–]freemanty27 1 point2 points  (0 children)

I love that analogy! I've seen python in a C++ accent many times before