Remix.run Logo
airstrike 14 days ago

As someone who spent nearly a decade with Python, I'd say 90% of people will answer "yes", so I'd like to offer a different perspective.

IMHO if you want to pick it up for a couple toy projects just to get a feel of what coding is like, then by all means try it out. But eventually you'll benefit tremendously from exploring other languages.

Python will teach you a lot of bad habits. You will feel like you know what you're doing, but only because you don't know all of the ways in which it is handwaving a lot of complexity that is inherent to writing code which you should be very much aware of.

Knowing what I know now, I wish Rust existed when I started out so that it could have been my first language. I'm never giving up the borrow checker and the type system that come with it.

But you don't have to do Rust. It's fine to work on a couple of projects in Python, then maybe something small in C (though the tooling can feel arcane and frustrating), then maybe switch it up and go with some more functional programming (FP) flavored like Lisp or F#.

I know Rust has a lot of zealots and a lot of haters, but I'm not pushing an agenda. I just think it strikes that perfect balance between being extremely expressive, clear to read (after maybe a month of writing it daily), strong type system, lots of FP elements, no OOP clutter but super powerful traits, the borrow checker which you'll invariably learn to love, and more...

This will give you a strong foundation upon which you'll be able to continuously build knowledge. And even if you start with Rust, you should definitely explore Python, C, Lisp and F# later (or maybe Haskell instead of F#)

system2 14 days ago | parent | next [-]

With the help of GPT, I think the bad habit part is non-existent anymore. Learning it from GPT really helps people nowadays. Ask ChatGPT 4.0 some questions, and you will be shocked by how well it describes the code.

Just don't ask to fix indentations because it will do it line by line for hours. But it finds mistakes quickly and points you in the right direction.

And of course, it comes up with random non-existent modules once in a while which is cute to me.

airstrike 14 days ago | parent [-]

The bad habits I was thinking about were more in the line of not understanding how memory is being used (even something as simple as stack vs. heap allocation), not having a type system that forces you to think about the types of data structure you have in your system, and overall just being forced to design before coding

system2 13 days ago | parent | next [-]

I ask for help from ChatGPT before I go all in, and it creates these old-fashioned ASCII graphics to show how the flow will be. I think newcomers will not have the bad habits we have/had.

airstrike 13 days ago | parent [-]

That's really not enough or the same, trust me. You can't outsource your entire understanding to ChatGPT, and I say this as someone who's keen on getting help from AI assistants to write boilerplate code, rubberduck bugs or debate design decisions

throwaway314155 12 days ago | parent | prev [-]

Respectfully, many of those things aren't a concern from Python's point of view. And why should they be? If your program runs imperceptibly slower, or using an insignificant amount of extra memory, any attempts to fix this are considered a premature optimization that gets in the way of what is more important to pythonistas - developer experience and high level abstractions.

Frankly, the comparison with Rust doesn't even really make sense. They are different tools for very different problems.

airstrike 5 days ago | parent [-]

Except it's not imperceptibly slower, it's orders of magnitude slower.

Barrin92 14 days ago | parent | prev [-]

>Knowing what I know now, I wish Rust existed when I started out so that it could have been my first language

No offense but I don't think this makes any sense (or only if you take the first part of that sentence literally). It's like jumping into Calculus 3 to introduce a kid to maths. From a teaching standpoint, if you're a beginner, you can't even understand what problem Rust solves. Someone who doesn't know what manual memory management, a heap and a stack is should not be handed a borrow checker.

You can either start from the top, the old school way, teach a lisp or python as a more modern alternative and teach people symbolic computing, or you can start with C and teach people from the bottom up how computers work, but frankly throwing you into a language that basically exists to solve problems professional C++ developers have in large projects is kind of wild

airstrike 13 days ago | parent [-]

People were learning C and malloc long before Python came along. You don't need to start with a high level language.

Rust does way more than "solve problems professional C++ developers have". That's not a fair or accurate read of the language. I think you're misinformed.

Barrin92 13 days ago | parent [-]

>You don't need to start with a high level language.

I didn't say that. I said you can start with a high or low level language. I did literally mention C in my own post as a decent starting point.

Rust however is not a beginner friendly language because again, the thing that sets it apart is that it aims to solve a particular domain specific problem of programming, which is memory management, in a unique way that means nothing to a person who has never been exposed to the problem in the first place.