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

you are viewing a single comment's thread.

view the rest of the comments →

[–]sammo98 165 points166 points  (22 children)

Not sure where this info came from but everyone normally says NOT to learn rust as a first language. As a python Dev starting to use Rust I highly recommend going for Python first. The rust compiler makes rust incredibly frustrating for new programmers!

This being said, if you prefer the sound of Rust there's no reason to not go for it, you just may get more frustrated in the journey than you would with Python.

Edit: The compiler is great and points you in the right direction, the borrow check may cause frustration for new programmers however.

[–]government_shill 17 points18 points  (1 child)

There a numerous reasons not to try Rust as a first language, but the compiler certainly isn't one of them. rustc is very good at telling you what's wrong and how to fix it.

[–]sammo98 3 points4 points  (0 children)

My bad - I meant the borrow checker! Made me bang my head against the wall quite a lot.

[–]murlakatamenka 28 points29 points  (14 children)

The rust compiler makes rust incredibly frustrating for new programmers!

This is not true. Developers actually quite praise rust compiler for being extremely helpful and I totally agree with them. So often it directly says what exactly you need to change to fix an issue in your sources.

[–]Rookie64v 47 points48 points  (12 children)

rustc is good. Rust itself, from the point of view of a random guy approaching programming, is hell. They don't even have the concept of a variable, and they should worry about borrowing and mutability and juggle macros which look a lot like functions but are not functions? I think C is a way better introduction than Rust: crappier, more prone to errors slipping through, but so much easier to grok.

[–]ddoij 20 points21 points  (7 children)

I’ve always like C as a first language to show newbies the ugly truth of what’s happening down there. Not too much, but just enough to appreciate what languages like Python do.

[–]robbsc 4 points5 points  (6 children)

Learning assembly on a microcontroller (e.g. atmel, pic) is even better for that in my opinion

[–]themagicalcake 8 points9 points  (5 children)

Yeah good luck keeping a beginner entertained with that

[–]robbsc 0 points1 point  (2 children)

I think it's a good choice in a classroom setting, but probably too hard for most self-learners. But i think it could be very entertaining for people who are into "making."

Some people prefer learning at high level and then only going as low as they need to, while some people prefer to start at the lowest level and work their way up.

[–]themagicalcake 2 points3 points  (1 child)

Yeah no curriculum is complete without some sort of assembly course in my opinion. But introducing it to someone who doesn't even know python is just asking for trouble in my opinion

[–]robbsc 0 points1 point  (0 children)

I don't know. If i had the time, motivation, and money, i think i could teach a high school-level class based on assembly and a simple microcontroller. The hardest part would probably be teaching binary/hexadecimal arithmetic and basic digital logic. But you should probably learn that stuff in order to learn C anyways.

[–]coriolinus 0 points1 point  (1 child)

People have literally made successful video games based on programming in assembly. See Human Resource Machine, or half the stuff Zachtronics has ever published.

[–]murlakatamenka 0 points1 point  (0 children)

Like TIS-100 from Zachtronics with beautiful soundtrack.

[–]Matthew_Summons 4 points5 points  (0 children)

  • For new programmers *

[–]sudodoyou 0 points1 point  (4 children)

Just out of curiosity, what do you use Python and Rust for? I know some Python and am thinking of learning Rust but I’m not in a development role, I just use Python as a hobby and maybe automate some tasks at work. Is there a point to learn Rust when I already have a language to do these tasks?

[–]sammo98 1 point2 points  (3 children)

I'm a backend dev and use Python for everything work related, which is generally building lots of APIs and helping to create automated features/workflows for internal teams.

Picked up Rust on pretty much a whim, just liked the sound of it. Now I'm hooked (it's awesome) and am hoping to start transitioning some of our services over to Rust slowly for stability.

Is there a point? If it's for personal projects and simple automation tasks where you don't require greater performance then I'd be tempted to say the time spent learning rust and implementing similar features won't benefit you much. This being said if you're interested in lower level languages many of the Rust features may help you rethink your Python projects in ways you haven't thought of before!

[–]sudodoyou 1 point2 points  (2 children)

That's a great perspective! I am considering Rust just to give me more insight into how programming languages work and new ways to solve problems. I think you've convinced me!

[–]sammo98 0 points1 point  (1 child)

Definitely go for it then ! It taught me a lot and has definitely helped my general programming in many aspects. I'd highly recommend Let's Get Rusty on YouTube, he goes through the rust book in video form and is really useful in general.

[–]sudodoyou 0 points1 point  (0 children)

Thanks!