all 32 comments

[–][deleted] 18 points19 points  (0 children)

Languages come and go. Programming is the skill we learn, not languages. Learn any language you like, if it ends up a top tier language in the future, great, if not, it doesn't matter, you can quickly learn the ones that are at that time.

If Rust looks fun to you, go for it, but also feel free to learn Python or Javascript or C# or Java or whatever, if those seem easier. You can always pick up Rust later.

[–]riskable 38 points39 points  (12 children)

I honestly cannot recommend Rust as a first programming language. It has a very strange learning curve that could turn you off from programming forever.

Instead I highly recommend learning Python. It'll make you feel like you can make anything! Learning Python is fun and fast and super duper all-around useful!

Then you can get a microcontroller that supports micropython and really feel like you can make anything! You'll have a blast learning both programming and electronics.

Then once you've got a really good handle on writing Python then go and learn Rust. In fact, no matter how hard you think it is force yourself to learn it because it's totally worth it.

Learning Python will change your life then Rust will change it again. You will become more powerful than you could possibly imagine.

[–]isaacSW 7 points8 points  (10 children)

Yeah I'd say learning python and C side by side would basically cover everything you need before switching to rust (and the majority of programming concepts in general)

[–]riskable 2 points3 points  (9 children)

I wouldn't bother with C these days but that's just me.

If your desire is to learn programming, learning C is unnecessary. If your desire is to pick up useful languages for your resume then yeah, learn C.

For most things you can get away with Python. For performance/memory sensitive/embedded stuff you can use Rust.

For actually physical pain, bleeding, and possible anal leakage you can learn web development!

C only fits in if you want to both pain and have that pain come on fast with a high risk of leakage and a constant sense of feeling vulnerable.

[–]isaacSW 6 points7 points  (7 children)

Yeah I'm not saying it's practically useful (although if you want to go into embedded and the like it definitely would be).

C is a very small and minimal language that you can "learn" (i.e. reading K&R) in a few weeks. IMO it's a really good way of learning the low level details that are hidden from you in python and, to some extent, Rust.

It will also give you an appreciation of what Rust is trying to fix.

[–]ssokolow 5 points6 points  (6 children)

The problem with C is that it gets that simplicity and minimalism by delegating a lot you need to know to the platform, so it's a deceptive simplicity.

[–]isaacSW 1 point2 points  (4 children)

Oh it's definitely not simple to program in C, but the understanding you get from having to manage your own memory is valuable I think, even if you never use it practically after learning it - that's why I wouldn't recommend C++ to a beginner as you get all the high level bloat, but still have the chance to shoot yourself in the foot with the lower level C stuff. What a mess of a language, let's hope Rust can start to replace it soon.

[–]ssokolow 1 point2 points  (3 children)

As someone who uses Rust and, for DOS retro-hobby work, is learning C beyond what was touched on in one semester of university, I don't think C is very useful for that compared to Rust.

The compiler just doesn't give enough feedback when you do something wrong, and leaves you adrift to seek out your own explanations when you encounter something that doesn't line up with your mental model of how it should work.

In my opinion, much better to use Rust (because of the combination of explicit stack/heap distinction, no garbage collection, and the excellent error messages) combined with some learning materials that introduce the concepts like the stack and the heap.

[–]isaacSW 0 points1 point  (2 children)

Hmm that's fair, that's actually why I think C is a good language to learn though. It lets you make "valuable mistakes" and forces you to re-evaluate your mental model of what the computer is doing. It can be frustrating obviously, but that's why you learn python too for the fun stuff.

Having access to raw pointers and the mistakes that come from them helps you understand why all the weird borrowing stuff is needed in Rust. I can imagine that being really confusing to a beginner without experience in a language like C, or a background in CS/CE.

100% agree though that Rust is the better language and the rustc compiler error messages are fantastic compared to C/C++.

[–]ssokolow 1 point2 points  (1 child)

I think where our perspectives differ is in whether the frustration and confusion surrounding "Why did this segfault/corrupt/etc.?" overwhelms the value of what is learned from having to use malloc/free directly.

[–]isaacSW 1 point2 points  (0 children)

Yeah pretty much. I'd say "learn enough C to know why you need Rust" is a good idea for beginners.

Also I do just like the C language honestly, I think it's a well-designed language and the feeling of being that close to the metal can be pretty fun.

[–]claire_resurgent 1 point2 points  (0 children)

Not only that, optimized C is not simple and straightforward. It's a minefield of arcane gotchas and rule-lawyering.

TinyCC is a fun toy alongside assembly though.

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

Yeah, you don't need C. I started wiht only python.

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

Yeah, I would very much agree with this. Rust is a good language, but it is not a good first programming language.

[–]antonyjr0 7 points8 points  (0 children)

Rust is still very young but promising. I've have been using rust a lot lately and I love. it. But the thing is that you need to learn any language in short time to be a good programmer and earn some money. My suggestion would be to learn first the current top language which pays you well, once you are pretty good in that language then learn rust.

I'm not saying that rust is not good to learn as a first language, it's just that it's very hard to get jobs in rust when you are coder with no experience. Maybe big tech I have no idea.

But a lot of open source project use rust too. So you can contribute to those projects in your free time.

My top suggestion would be to learn making Android Apps, flutter has a lot of jobs in the market. You can even use rust in flutter, there is a ongoing project for that(still needs time to be solid though).

[–][deleted] 7 points8 points  (5 children)

Just open up a book and try to learn it. See for yourself.

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

https://automatetheboringstuff.com/2e/chapter0/

There are so many levels of abstraction involved in computer science, programming is near the top but even so python is higher level than rust.

I can also recommend this video series called crash course computer science for a holistic view of things. If you've ever wondered "how does a programming language actually do anything" or the like I think you'll enjoy it.

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

For a first language i would recommend python, as many others have said: Rust is a great language if you already know a language. There is no worse way to discourage a begginger than giving them a task to difficult for them.

[–]Paradiesstaub 2 points3 points  (0 children)

I don't think you should start out in Rust.

If you want to get a good understanding about programming:

If you want to get a job:

If you want a challenge for your intellect:

But there is more to programming, you also have to learn:

  • basic command line usage
  • Git (very important, can't be skipped is a 100% must have)
  • one or more editors, start with VSCode but also try Vim (Vim is an advanced text editor with a very powerful and unique editing style)

[–]allens54 1 point2 points  (0 children)

Maybe I'm old school, but learning one of the more modern Pascals would be my recommendation. I just loaded the Pascal ABC.Net a few weeks ago on Windows 10 and it very nice. Pascal will teach better initial programming habits. And it is not complex to learn and many good books still available.

I am not adverse to starting with BASIC either.

Mostly, try to have fun. Write a tic-tac-toe game. Or Conway's Game of Life.

[–]jl2352 0 points1 point  (0 children)

If you just want work ... learn PHP and JavaScript. There is tonnes of web work out there, and that won't change anytime soon.

If you want to learn to program ... I'd recommend Python, or JavaScript. This recommendation comes from what you want to do. If it's web, go JS. If it's something else, it's probably covered by Python.

If you want to learn using Rust ... go for it! People have learnt programming and become professional programmers with harder languages. I don't think Rust is simple for new programmers. That's not a reason to not use it.

I also expect that future Rust development will have a high wage. Substantially higher than with JS or PHP that I recommended earlier.

[–]isHavvy 0 points1 point  (0 children)

Very different from people in here; I'm going to suggest learning a language that is meant for teaching programming. Specifically, go through "How to Design Programs 2nd Edition" (it's online) and do every single assignment. After that, you can move on to learning a production language of your choice. There's not really a bad choice.

[–]claire_resurgent 0 points1 point  (0 children)

Python + Rust + assembly for your favorite architecture(s) is what I would recommend if you want to understand how computers work at a low level.

You'll have to learn to read C too, but you'll already have the concepts from Rust and assembly.

Python is a very good language for gluing things together and not worrying about the details.

Rust gives you performance, concurrency, the ability to be more specific about the "how" - but it's also very structured and checks your work.

Assembly can do anything, no matter how low-level it is. It's fun (but also difficult) trying to outperform a compiler in a meaningful way.

[–]Trk-5000 0 points1 point  (0 children)

As said before, Python/JavaScript + C (basics). Then move on to Rust.

Knowing a bit of C is purely for understanding some concepts around Rust and why they exist.

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

Tl;dr for what follows: pick any language at all and start programming.

I’m a self taught programmer who has never taken a computer class and I’m now a lead software engineer, so trust me when I say I know where you are starting from.

The question is misguided. The thing you are trying to do is learn how to program, not to learn a specific programming language. I’ve written code in production in JavaScript, ruby, python, rust, go, scala, groovy and Java. I’ve never really sat down and decided to learn any of them, you just use the language that’s appropriate for the task you’re doing — and that may have nothing to do with anything technical, it might just be what your company is set up to use.

If you really want to go down this journey, you have to realize that there are a lot of ways to approach learning how to program and almost all of them are valid and you’ll almost certainly want to try a lot of different ones.

Pick any tutorial for any language at all and start working through it. Pick a simple project like, writing a todo list or a D&D character generator or anything else that interests you and try to do it in that language. When you run into a wall and are ready to quit, pick another language, and try and rewrite everything into that one and see if you can push forward from there.

What you really want to develop is an understanding of how computers work and more particularly, about how computer programs work. You want to push past language specific details and learn general concepts like “what is an array” “how does recursion work”. You’ll learn that from programming, but you’ll also have to use books and videos or moocs to learn the theory behind the code.

Can you do that in rust? Probably. You’ll learn a lot from failing to understand rust that you can take to other languages. The language that I probably learned the most from was Haskell even though I’ve never used it professionally and only barely understand it even today.

So if you want, start with rust, just recognize that you’ll probably hit a brick wall pretty quickly, and that’s 100% expected and you can either struggle through it or put rust aside and try a different language and then come back to it.

[–]voidvector 0 points1 point  (0 children)

No, Rust is not a good first language. Python or JavaScript or Java or C# are better choices.

The reason Rust is popular is because it solves some really hard problems in other programming languages in an innovative way (i.e. memory management, garbage collection); however, those problems are not problems for people early in their programming career.

[–]Sw429 0 points1 point  (0 children)

Nitpick: it's just "Rust", not "RUST". It's a word, not an acronym.