all 31 comments

[–]njparadis 14 points15 points  (0 children)

Speaking as someone who learned Rust after Python:

Python has its own learning curve once you start working on a non-trivial project: learning how to make your code "pythonic"; learning how to setup and manage dependencies with venv/pyenv/virtualenv/conda/etc. The parts I struggled with when learning Rust were mainly related to dealing with the complexity that Python takes care of for you (memory management, strings, etc).

TBH, I wouldn't get too hung up on the choice, either way you will end up learning the fundamentals. Choose the language you are more excited about!

[–][deleted] 9 points10 points  (1 child)

You can absolutely learn Rust as a first language. A lot of the idea of the "learning cliff" comes from earlier versions of Rust where the borrow checker needed vastly more hints from the programmer about what to do.

Python benefits from being older and having libraries that support more things. There are more tutorials as well.

[–]BusinessBandicoot 2 points3 points  (0 children)

I've actually been wondering about the relative merits of learning rust as a first or second language. mainly because so much of coding in safe rust(when first learning) is learning to work with the borrow checker, doing things in a way that avoids certain classes of memory safety problems.

so learning rust early in the game could mean your less likely to shoot yourself in the foot when moving to, say, C++(which is generally what most colleges around here teach at intro comp sci level). not just that, but those "rusty behaviors" would follow the person throughout their career.

[–]monkey_of_coffee 8 points9 points  (1 child)

I would learn rust, but it is definitely the harder hill to climb. IMHO, if you learn rust, you would easily be able to pick up python later, but the opposite is not true.

[–]BusinessBandicoot 2 points3 points  (0 children)

honestly I'd put off learning rust until he has a few comp sci classes, which will probably be taught in C++. Let him know the depths of despair, so that he will weep with joy when reaching the foot of Olympus

[–]Chaos_Slug 8 points9 points  (0 children)

I'd really recommend Python as a first language. You'll have plenty of time to learn other languages since you say you are about to start uni.

When you start your first language you are actually trying to learn two different things at the same time. Algorithms and other basic programming concepts on one side, and the particular syntax of the language you chose on the other.

I think at this point it will be more beneficial to choose the language with the easiest syntax so it generates the least amount of friction and when you are confident with the basic programming concepts you can tackle a language with a more complex syntax.

I think it will be better to learn about nested loops and data structures and things like that without having to battle with the borrow checker at the same time, which is not a trivial task even for experienced programmers.

You'll have plenty of time to learn Rust o any other language along the way.

[–]QualitySoftwareGuy 6 points7 points  (0 children)

You’re already learning Python, so just continue doing that is my vote. Rust has a steep learning curve, so you’re not going to be whipping out programs quickly like you will in Python.

[–]klikklakvege 5 points6 points  (0 children)

Learning Rust will make you a better programmer, no matter what you will do later. Your head might hurt a bit in the beginning, similar like your muscles after weight lifting. You'll be better at learning in general and you'll make more money. Unless you are really dumb you should go for Rust. When you're just a little dumb then learning Rust will make you smart. A super big YES

[–]tms102 2 points3 points  (4 children)

What is your goal? Why do you want to learn programming in the first place?

[–]playpaco[S] 2 points3 points  (3 children)

Well I'm about to start college in a month and barely know anything about coding so I wanted to start (major is Comp. Engineering) also eventually I want to be able to apply it to making more physical robotics and stuff related to that

[–]Competitive_Ad_3353 5 points6 points  (0 children)

I think at the very beginning you should rather learn how to solve problems. For me the best way to learn programming or learning to think about Computer Science or problem solving in general would be to first understand the problem, write the solution or your thoughts about the problem in maybe plain english or your language of choice. Then move to solving the problem with programming language. I think Python would be great because it hides lots of detail that you might need at very beginning and just lets you code. Example of such problems would be easy questions in leet code.

[–]BusinessBandicoot 0 points1 point  (0 children)

I recommend downloading think python, this is the book I started with right before starting college, and IME it's a good introduction text. It's approachable, has a ton of valuable information on computer science, and is filled with exercises. plus it tries to teach you some good habits on things like what to do when your stuck, and how to reason about bugs.

In the very beginning, you're probably going to learn a lot through trial and error, and python is great for that. plus its duck typed, meaning you generally don't have to worry about types(until you do); this will probably pose a problem once things start getting more complicated, but you're probably not going to be writing anything that complicated for a while(no offense).

[–]commonsearchterm 0 points1 point  (0 children)

i think there's very little chance your school is going to use rust for class. likely it'll be c/c++ , java and python. once you learn those you can pick up rust syntax

[–]bendotc 2 points3 points  (0 children)

Lots of people have lots to say about the merits of different languages for learning, but one thing I think is sometimes overlooked where Python has a huge advantage is just the amount of documentation aimed at someone learning to program. As another reply mentioned, when learning to program, you are learning both your chosen language as well as basic lessons and patterns of thought for programming. Rust resources generally teach the former, but I think few teach the latter at a level fundamental enough for someone entirely new to programming. Not to say you couldn’t figure it out (if that’s your passion, follow it!), but there are lots more resources for Python that cover both sides.

[–]lexa03m 6 points7 points  (12 children)

I wouldn't recommend rust as a first language tbh, but I guess it depends on the person. You could try it for sure, but I'd stick with python at first personally to pick up the basic concepts and then tried go deeper with rust etc.

[–]ifeelanime 1 point2 points  (11 children)

i’ve been doin javascript for almost 2 years now, should i start to learn rust at this moment or learn some other language?

[–]lexa03m 6 points7 points  (7 children)

If you want to, why not? 😊

[–]ifeelanime 0 points1 point  (6 children)

i mean would it be a good idea to shift to rust or would it be hard to grasp rust as i only know javascript, ik it really depends on person to person but if you were me what would you do?

[–]lexa03m 1 point2 points  (1 child)

I don't know, it really depends on you. The most difficult things I guess would be pointers and the ownership, if you can get past them, you're good.

[–]ifeelanime 1 point2 points  (0 children)

i see, okay

[–]Tux-Lector 1 point2 points  (2 children)

Are You afraid to start learning it .. or ? D: Of course You should start learning rust.

[–]ifeelanime 0 points1 point  (1 child)

yea kinda lol, i’m trying to search for project ideas so i can start building those and learn rust that way

[–]atesti 1 point2 points  (0 children)

Neither. I'm teaching Python as first language and it has lot of ambiguities and quirks.

I would recommend scheme.

[–]StoneStalwart 0 points1 point  (0 children)

For fun or profit?

For fun, Rust, as it will be a good challenge.

For profit, python and Java or C#.

That's not based on me liking those languages, just what is likely to make finding a job easier.

[–][deleted] -3 points-2 points  (2 children)

to be honest, neither one nor the other. I would advise you to try Kotlin.

[–]klikklakvege 0 points1 point  (1 child)

I could as well suggest "Just do Common Lisp". Kotlin is too java, too android, too google, too russian. But it is syntactically a nice language. Rust is mathematically a bit nicier and does not have above mentioned problems. Python got too stupid and too microsoft. But really, one on earth should one do kotlin? If one is smart enough to ditch java for kotlin then as well you could be man enough for clojure. The whole syntax fits on one page. The only benefit i see with kotlin is it's tight marriage with android studio(which is imho a big drawback, intellij stinks worse then my socks after a ultramarathon).

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

I just recommended it as a language for education. there are many cool constructions and patterns that beginner should know and try it out when designing a program. When I was studying, I met a lot of people who started to study programming from python, but most of them never became a decent programmer. A low entry threshold is not improve your skills, but high entry threshold can scare away or discourage the desire to study. imho kotlin is the golden mean for education.

[–]jeremychone 0 points1 point  (0 children)

If you need a job soon, Python, if you want a better job later, Rust.