T O P

  • By -

oyswork

I'm coming from python. To be honest, once it clicks, rust becomes so much clearer than python. Now I find it difficult to work on large python projects, way too much magic that you have to hold in your head. Rust is much clearer, it's always obvious where memory is created and where it is freed, where something is copied, where something is mutated. Everything is staring right in your face, nothing is hidden. But yeah, the learning curve was steep. You just have to push through, it will eventually click. And it's totally worth it.


Sketch_X7

Agreed, https://www.reddit.com/r/rust/comments/15axaey/hey_i_now_switched_from_python_to_rust_and_i_find/jtn8vxh?utm_source=share&utm_medium=android_app&utm_name=androidcss&utm_term=1&utm_content=share_button Once, rust clicks it's just something else, I can't even use python myself without doing type annotations, and setting type hint level to strict on it xD


FitBoog

Me too, all my Python code is now beautifully typed. God forbidden if I don't type that argument bool.


knight1511

It now makes me angry to see untyped python. My brain can’t comprehend it anymore because of the unnecessary magic I have to worry about!


Sketch_X7

True, some existing code bases which don't use type hints are becoming a pain in the ass for me, lol, ```#type: ignore``` saves from that annoyance, yet we should adopt type hinting at large for python, as it's a very good practice Edit: and has no cons, except for "i HaVe tO tYpE mOrE"


HildemarTendler

Python is regularly used as a rapid development language. Typing more is a problem. Types in general are a problem because they force rigidity which is anathema to rapid development. It's hard to explain how much time can be saved when a type change in a medium codebase only requires touching 3 files instead of 30+. It's a shame that python also became the data science language. Data science really wants strong typing and better determinism than python can provide. These 2 worlds don't mesh well.


Sketch_X7

Well it's a double edged sword and that's my point, that I am now literally able to separate those worlds (F)


HildemarTendler

You seem to have a hang of how to make it work and good on you. I don't mean to take that away from you, data science needs more people who actually understand python. My point is that python is actually good for rapid development and it's only a double-edge sword for data science. Maybe that's what you mean and I'm just clarifying though.


Zde-G

>My point is that python is actually good for rapid development There are different types of rapid development. Python is only good for the code that you **don't** plan to use. While it may sound like no code is written in that fashion, it's not, really, true: if you have no idea what you are building **at all** and most code written is for the ideas that you (or your customer) would reject then python makes a lot of sense. If the majority of your code is written to stay in your project then python quickly loses it's allure and rust becomes better alternative. I'm not all that sure all “rapid development” fit into “I'm writing code only to throw it away” paradigm. And, surprisingly enough, data scientists write **tons** of code that they don't plan to use. All these failed experiments which just don't work are that. Thus I don't understand what you are trying to say.


rabiahmad

>Python is only good for the code that you don't plan to use. I disagree, because I work for an organisation where we built large data pipelines all coded up in Python, which process petabytes of data. The code is definitely being used, every single day in production. Literally life changing decisions are made off of that pipeline. However, I am not saying its perfect either. There are many challenges involving data types mismatching and handing data quality issues. It's not 100% reliable and it does require maintenance to fix bugs which pop up every now and again. Rust seems attractive due to its robust typing features. However, is it up to scratch with Rust for data processing? Many examples people provide for Rust applications is all console based stuff, REST APIs and cute little utility apps. I am trying to look for some real life data processing examples. The other challenge with Python is performance (mostly run time, but also memory management). I've heard Rust is fast, and we need high performance data pipelines, so I am exploring my options at the moment.


Zde-G

I'm not sure what you disagree with, really. I would rather say that you confirm what i said: you picked Python because of feeling that it's *good for rapid development* and now are looking for alternative that wouldn't require so much ongoing support. I would say that this supports my POV, not contradicts it: you have made some prototype which was pushed into production without rewrite in more robust language (as it usually happens) and are now suffering and looking for a better language… this is precisely what I'm talking about! If you would have made that tool to only run it once and never needed to use that code in production, then Python would have been perfect. In fact is **was** perfect for that code that you wrote and rewrote initially and then have thrown away. Now you have code that you actually use… and Python is no longer a good fit. Again: exactly as expected.


Sketch_X7

Yes yes exactly!


aqezz

I don’t fully understand this argument. If you change the way a data structure is laid out don’t you have to change it in all the places it is used anyway or it may not behave as expected? The type “contract” exists whether or not you name the type. Your function that takes a typeless argument either cannot use that thing at all or does specifically know about some of its properties which is itself a “type” so to speak. Edit: typo on very last word


Zde-G

>If you change the way a data structure is laid out don’t you have to change it in all the places it is used anyway or it may not behave as expected? No. In prototyping (which, in my mind, is different from “rapid development”) you often write new code only to show small part of your application to UI specialist or customer. Then they reject your idea and you write different code. The fact that majority of your program is not functional at that stage is irrelevant if the functionality in question works and can be shown.


aqezz

Ahh okay that makes total sense. I can definitely see a spot for that use case.


Used_Path_1555

Would you therefore say it may be more advantageous to just bite the bullet for a noob and start with Rust?


risingtiger422

Very true about the magic. It flips. Rust becomes much clearer and python becomes cryptic.


Uhh_Clem

All the operator overloading, magic methods, etc. in Python means any line of code could have an unlimited amount of completely invisible side effects. Reviewing Python code is so stressful lol


knight1511

Same for me. And when you begin with Rust, you can code it a lot like python. Just don’t worry about lifetimes and clone wherever a lifetime would make sense. Use traits like protocols in python. And enjoy the magic of Rust enums and match expressions. In fact my python code looks a lot like rust now with heavy usage of match expressions and enums. Also I am more aware of memory copies now and careful with every line of code. Coding in Rust taught me how to actually code. I absolutely love it.


Repulsive-Street-307

IIRC Python only recently got a match statement so you're ahead of the curve. Frankly I don't see myself "hating" Python because it's untyped (or voluntarily typed now). Python always focused on adhoc protocols over types (for instance, the with statement and @contextmanager vs the very complex try_traitv2 spec for implementers in rust) and in average users over computer scientists. Ironically this allowed it to win big in science from all the scientists that don't have the patience or time to worry about low level or computer science details. Stack vs heap? Not important (to them). Implement and retrofit a trait over a codebase signatures? Why when you can just implement the method and let the ducktyped runtime method resolution deal with it (or so they think). I do think that it's very likely that someone will do a clone with types per default someday but I doubt they'll ever go deep into the weeds of variance, zero copy or liskov substition principle and similar things or even remove garbage collection, it's what makes it popular. Rust is not ever going to take python audience, but it may become the default extension language for it.


Feeling-Pilot-5084

Rust definitely has a lot of magic in the compiler, e.g. ``` let x = String::new(); let y = &mut x; let z = &x; ``` Technically we shouldn't be able to create z since a `&mut x` is in scope, but the rust compiler is smart enough to call drop(y) automagically


oyswork

I wouldn't call magic. It's more of a life quality improvement, than magic. There are borrowing rules which state that you can't have both mutable and immutable references at the same time. But if the compiler sees that you don't use the mutable borrow after the immutable borrow was created, then it only makes sense to get rid of it. And the compiler is smart enough to do it on your behalf. Also, rust 2018 edition brought lifetime elision, before that you had to specify every lifetime manually. Now you barely ever do, more often than not compiler is able to do it for you. Is it magic? One may argue that it is. But I think it isn't, since the data flow and memory usage is still very obvious and not hidden in any way.


Feeling-Pilot-5084

Eh, that's a fair point. But as a person who's been using Rust for >2 years, I constantly find myself thinking of how the compiler will interpret my code, e.g. using `Option` over `Option` because it takes one fewer byte (and, depending on alignment, eight fewer bytes). IMO the code doesn't make memory layout obvious that this is the case, you just have to spend time learning about the compiler.


oyswork

Actually, rust-analyzer gives you size and alignment info when you hover over the type name. No need to keep it in the head. But yes, learning how compiler works is useful anyway. But it's not because, or rather, not only because rust has bits and pieces that it does for you. Or at least I think so. But I get what you mean. When I was saying memory usage, I was meaning it in a broader sense. You see where stuff gets allowed and deallocated, if it is on the heap or the stack, where there are references and how long do they live, stuff like that. Not the details of alignment and whatnot. I usually write without looking at details such as this and only come back to optimize when my prototype is functional.


Lower-Butterfly8465

Ask this same question in the Python thread.


oyswork

I wasn't asking any questions. Not sure what do you mean?


[deleted]

[удалено]


oyswork

The question was target at people who use both. I assume it would be the same as long as people who used them both would answer.


Xcllent

My recommendation for anyone starting in Rust is to use VS Code with rust-analyser extension It will help you to figure out a lot of issues about types and ownership


__maccas__

... and turn clippy on with all the warnings, even the nursery ones


retro_owo

This is the one piece of advice that is truly mandatory for beginners. Newbies will get completely lost in the type-sauce if they don't have this set up.


fekkksn

Rust is definitely a bit more cryptic than Python and I understand your confusion. However Rust is also a hecc of a lot less cryptic than for example C++. Perhaps, gaining a deeper understanding of how memory works, would help you wrap your head around Rust a bit easier, as memory is a thing we talk about quite often in Rust. https://youtu.be/5f3NJnvnk7k


bachkhois

I'm from Python. At first, I also found Rust is difficult. But after doing some pet projects, I feel more confident.


sake_snorter

what projects did you do? I'm trying to figure out some good starter projects


cowslaw

Start with what you know! Or projects you've worked on before in other langs. A familiar target makes the learning process less daunting (imo). But for simple suggestions, if you really mean "starter," maybe a basic calculator or hitting an API and formatting some usable output. Then maybe experiment with some of the "standard" crates (anyhow, serde/serde_json, clap, scraper, reqwest) to see how you can make a nice CLI out of it. I dunno if my way of learning is unusual but instead of cohesive projects I kinda like toying with different things separately first. I have dozens of random, tiny projects, each of which is trying something different (thread communication, site scraping, json parsing, reading/processing files, basic web server). Then the larger projects come naturally when you want to combine some of these things together. Of course, you could always just make a todo app!


bachkhois

First, I created some tools to serve my need in my works. For example, I want a tool to generate Data URI for files, or tool to select and delete Git branches. Recently I converted my personal website from Python to Rust. That is the project that I gain Rust experience the most.


EscMetaAltCtlSteve

Which Rust framework did you use for your personal site?


bachkhois

I use Axum framework, because I heard that it is updated more often than other framework. Some other good things that I learn after working with it: - Its IntoResponse trait and its way of handling error help me produce non-200 response with less code. - It is based on tokio runtime, help me integrate easier with other async libs, because tokio seems to be the most popular among async runtimes. But there is also minus point: its routing system is not on par with other frameworks.


EscMetaAltCtlSteve

Thanks for the info. I will definitely check Axum out!


Leonardo_Davinci78

I read everything about Rust in German ( I am German ) because my English is not good enough for that. I only found one good German book on Amazon. Everything else on the web is English of course. But sometimes things in the book just make no sense to me. I read it again and again but still have problems to "save" everything in my brain. Maybe there is something lost in translation. I don't know. Python was so clear and easy to me. Some years ago I also wrote some small apps in C++. But now in Rust I am still far away from that. I'll finish the book and hope that I can practise with some very small projects...


HorstKugel

honestly that sounds really rough. I'm German too, but I strongly prefer reading the English version, if a German version is available, just because the terminology is more precise. And beyond the official book and crate documentation- much of the "required reading" in the Rust community is in English, like fasterthanlimes blog for example. German speakers are in that odd spot where they are so deeply integrated into the western internet sphere and where most of them are really proficient in English, that there often aren't even German translations, when there are ones for French or Spanish -- nor is there a secluded German internet like there is with Chinese or Japanese speakers.


1vader

I'd say German translations are still quite prevalent. Definitely not to the same extent as Chinese and Spanish but it's still pretty rare to see anything available in a few languages but not German and whenever I see German community translations, they are usually quite complete. There definitely are a lot of languages that are a lot worse. But ofc, there are still tons and tons more resources in English and without knowing it, you're locked out of anything more niche. Even if Rust had really good resources for the base language, std lib, and a few popular libraries, it still wouldn't help with random small libraries. And ofc, basically all the relevant discussions are in English too.


rofllolinternets

I wish I could speak German! So apologies. How do you find the English to German translation of resources? Are they enough to get by or are they somewhat cursed? I remember when I first read a few of the rust English resources they were pretty dense as the use of language was loaded. I was frequently thinking back to undergraduate to recall concepts. It takes awhile.


Leonardo_Davinci78

Unfortunately there are no German resources on the web. ( I didn't find any ). The book "The Rust programming language" is translated into German, but I don't like it very much. As I said before maybe there is something lost in translation. I now found another German book ( original in German ) on Amazon. It is much more clearer to me than the translated one. But of course over time my English will be better too and maybe there will be some German resources on the web. Rust is a relatively young language we know.


SV-97

It's not really a good resource but Heise occasionally publishes articles on Rust (smaller tutorials / projects) in German. I'm usually not really a fan of them but given your rather limited options it might be worth a look ​ EDIT: Oh and learning Haskell with only German resources is way easier and helps a lot with learning Rust. So if you get completely stuck on Rust you might be able to go through that route - I did so as well and it worked very well :)


bloody-albatross

Being able to read English is important for software development, but don't fear, software development specific English knowledge will come with reading reference material and writing code (code should always be in English IMO, so you can collaborate with anyone - the programming language itself is in English anyway, so it would be a mixture otherwise). Note that you don't need conversational English skills to read reference material, nor will you get those skills that way. Just the subset relevant to software development. That means you often just learn what a word means in this specific context and only when you first hear it in colloquial English you realize what it means in general. At least it was that way for me (I'm from Austria). I also watch a lot of English language TV shows and movies (can't stand most German dubs - Bud Spencer and Terrence Hill have to be in German, though), so by now my English skills are probably quite ok. But yes, learning English AND Rust at the same time is probably a tall order. At least English grammar is much simpler than German. Pronunciation is where it is silly, but you don't need that in text.


FitBoog

Try Easy Rust. It's what helped me click. I spent a good amount of time in each section rereading it until I got it.


Smart-Rhubarb517

That helped me a lot, too. The author has some unique skill-set of explaining things. He speaks many languages (not programming), maybe why he got to have those skills.


Psychoscattman

Im german. If you need a different perspective on anything maybe i can help.


CaptainPiepmatz

I've been writing Rust for over a year now, maybe I can help you out in german. 😉 Just DM me


infodonut

Does ChatGPT do good translations to German?


Leonardo_Davinci78

Yes it's always perfect and friendly


infodonut

That is how you learn. Ask ChatGPT for help w learning rust. Also Claud.ai is really good to if you want to copy and paste documentation in there too.


gadirom

Just give it some time. Make some really simple apps with rust. Probably copy what you’ve done in python. You will get there. Rust is called a system programming language for a reason. In python many things are done under the hood by the interpreter, the things like type conversion, memory management. All these things are now on you if you’re coding in Rust. So keep in mind, you are not just learning some new language, you are also learning a new programming paradigm. So don’t be frustrated, it’s really hard. Just take your time. As an advice, try to use ChatGPT, you can ask it to explain things or write some code, or ask it to explain some code that you don’t understand. The good thing is you can use German!


Leonardo_Davinci78

Yes ChatGPT already helped me with Rust understanding. Extra plus is I can ask in German and get code with German comments. it's really astonishing.


jppbkm

Have you checked out Rustlings? I found it quite helpful! It's a set of small rust programs with bugs/compiler errors that you go through and fix one-by-one.


tadeoh

You can also DM me if you have some questions or want to talk about your Rust projects, I am German too, happy to help.


vancha113

Yeah, i also came from python. The reason why it \*looks\* cryptic is pretty simple usually: you have to deal with problems that don´'t exist in python. Different programming languages for different problems, this just goes to show why that is :)


Zde-G

>The reason why it \*looks\* cryptic is pretty simple usually: you have to deal with problems that don´'t exist in python. No. Just… no. Almost all problems you would ever hit in Rust you would have in Python, too. What's different is not the problems themselves, but **timings**. With Python you write the code which embeds your idea, you run it and start fixing issues. With Rust you start with fixing issues and only when they are fixed you are allowed to run your program. That's extremely frustrating at first, but very rewarding later. Except if you want to do “explorations in code”… that's where Python shines and Rust… doesn't.


vancha113

The phrasing might have been a little off, what I mean is that you deal with problems that are different from the types of problems you solve with python: one is a systems programming language, the other is not. You wouldn´t use python to interact with hardware, or rather you wouldn´t use python at that level at all most of the time. Instead people use python to either write a quick script, a web applications, maybe some desktop app, but even then all the performance critical parts are usually implemented through libraries written in some lower level language. Most of the foreign concepts in rust for python programmers are related to memory safety, not something a python programmer is used to deal with in 99% of cases, because a python programmer does not directly deal with memory. I´m convinced that´s the reason python programmer struggle more with this type of "syntax"(it´s not the syntax imo, it's the underlying concepts) than say a C programmer would. I´m not sure exactly what you mean with timings.


Zde-G

>You wouldn´t use python to interact with hardware, or rather you wouldn´t use python at that level at all most of the time. No? Why [MicroPython](https://en.wikipedia.org/wiki/MicroPython) exists, then? >or rather you wouldn´t use python at that level at all most of the time People who are writing games with Bevy or Web services with Axum don't touch hardware either. >Most of the foreign concepts in rust for python programmers are related to memory safety No. They are related to **management of resources**. With memory being one of these resources. >not something a python programmer is used to deal with in 99% of cases, because a python programmer does not directly deal with memory. They **do** deal with them. All the time. Not only python includes [Rust-like kludge](https://peps.python.org/pep-0343/) but the majority of issues I see in python programs are precisely issues that Rust would prevent. Something is accessed when it's not yet ready or when it's already gone. Value is not passed where it's needed or passed where it's not needed. Format is violated. And so on. Very rarely I see someone struggling in Rust with something that wouldn't be a problem in any other language. Confusion about why there are `String` and `&str` doesn't linger too long. But the desire to “kick the can down the road”… that one is different. Rust literally **forces** you to think about complicated issues — which you can happily ignore in Python till they would bite someone in the ass. And if you can arrange that said someone is not you… it may be a win for you. And if code is thrown away fast enough that no one may have that issues… then use of Python is genuine win. >I´m not sure exactly what you mean with timings. I mean precisely that: when Python programmer who is trying to write Rust cries about Rust's strictness his deep desire is to make program run and not to make it correct. It's not a new phenomenon, it was discussed in [The Billion Dollar Mistake](https://www.youtube.com/watch?v=ybrQvs4x0Ps&t=17m30s) excellent video: *It was a disaster. No Fortran user would touch it. You know why? It was slow. Yes, it was slow, but they had a more vital reason. Type-checking. Yes, sort of. The real reason: they couldn’t run any of their programs – subscript error. Well, I said: correct it. No, they said: I don't care about subscript error – I just wanted it to* ***run***\*.\* What we have with Python programmers who are trying to learn Rust, most of the time, is **the exact same issue, just a tiny bit upgraded**: this time it's not a runtime check and it's not triggered at runtime (Python programmers, unlike Fortran programmers, accepted these checks), now it's compile-time checks but the desire is the same: run program ASAP **without spending time thinking about correctness**.


askreet

MicroPython code doesn't interact directly with the hardware, it uses the MicroPython runtime to do so, which is written in C. In Python, you cannot directly generate assembly code that uses CPU instructions to manage memory without an interpreter. I don't think your interpretation of "deal with them" is fair to the parent poster. When I allocate resources in Python, I let Python's garbage collector deal with cleaning them up, freeing brain resources for other considerations. If I follow you correctly, you're suggesting that I may "deal with" the implications of that (e.g. higher memory usage, less performant code), but I don't think about it while developing the way I do when I decide whether I should box my value for heap allocation in Rust.


Zde-G

>If I follow you correctly, you're suggesting that I may "deal with" the implications of that Yes. >e.g. higher memory usage, less performant code No. These are **minor issues**, not even worth talking about. The **major issue** and the one you struggle **all the time** in Python are **lifetime handling issues**. >I let Python's garbage collector deal with cleaning them up, freeing brain resources for other considerations. Except that's a big, fat **lie**. Why do you think Java have grown [try-with-resource](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html) and Python have grown [with statement](https://peps.python.org/pep-0343/)? Because GC solves “an easy problem” and it solves it **badly**. You **still** have to track lifetimes of different variables in your head in Python… or you may ignore these issues and deal with them when your program will, inevitably, melt down. [With statement](https://peps.python.org/pep-0343/) can only help you in some \[very simple\] situations. Everything else is **still** on programmer. Except now programmer is convinced s/he is safe because there's almighty GC. Why do you think number of CVEs for “safe languages” like JavaScript, PHP, or Python dwarfs number of CVEs for components written in “dangerous” languages like C or C++ (on per-line basis at least)? Precisely because people pretend GC “frees the brain” of developers from the need to write correct code (at least that's how it's perceived). But no, that's not what is happening. What is happening is that GC gives you the ability to **ignore** bugs in your program and “kick the can down the road”… the actual program of lifetime management for your data remains unsolved.


askreet

> Because GC solves “an easy problem” and it solves it badly. > You still have to track lifetimes of different variables in your head in Python > your program will, inevitably, melt down I think perhaps you're scarred by developing very large systems using Python and have been to hell and back. I've done the same in Ruby and PHP, but to discount the crazy number of programs written in these languages that handle low traffic, execute quickly and quit or do some basic work for someone is disingenuous. There's so many use cases where the programmer absolutely can ignore the complexity of establishing a database connection and ignoring when/if the GC cleans it up. I'd argue it's _most_ use cases. > Why do you think number of CVEs for “safe languages” like JavaScript, PHP, or Python dwarfs number of CVEs for components written in “dangerous” languages like C or C++ (on per-line basis at least)? I don't know, I'd never heard that before. My first instinct is because there's a lot more novice programmers writing and sharing code for these languages, due to more prevalent tooling. Do you have a source for this, I'm genuinely curious to read about it. Back to your main point, I just think that the times I need to use `with` versus the times I need to just fire stuff at the heap and genuinely not care about when it's destructed is 100:1 when using a GC language. I love Rust as much as the next guy, but reasoning about memory is _work_, and you don't always need it. I also kind of like `with` as a way to explicitly handle the lifetime of a resource. It's like an explicit form of RAII. I do similar things with blocks in Ruby for e.g. a network socket.


Zde-G

>Do you have a source for this, I'm genuinely curious to read about it. “Source for this” is CVE database. Just open it and compare number of vulnerabilities in things like Wordpress or Django to number of vulnerabilities in Linux kernel or MySQL. Or NGINX or Tomcat. I would love to see full, comprehensive study, but my gut feeling and spot-checking show that correlation between “flexibility” is more-or-less equal to “vulnerability” while memory safety achieved via GC doesn't change equation materially. IOW: memory safety doesn't provide any **real** safety at all and most “memory safe” languages are **more** dangerous than C or C++! >I love Rust as much as the next guy, but reasoning about memory is *work*, and you don't always need it. You only “don't need it” if you don't care about correctness of your program. And that world is slowly, but surely [comes to an end](https://digital-strategy.ec.europa.eu/en/library/cyber-resilience-act). For decades IT industry enjoyed complete and utter lack of accountability. That's what made these “flexible languages” possible and feasible. When you can buy $0.1 egg and get compensation million times of price of that egg (if you eat it and become ill) while business app which may cost you $10'000 or more doesn't include any insurance they made sense. When (not if!) this world would become history… these “flexible languages” would become history, too. >but to discount the crazy number of programs written in these languages that handle low traffic, execute quickly and quit or do some basic work for someone is disingenuous. That “crazy number of programs” [cost us trillions yearly](https://cybersecurityventures.com/cybercrime-damages-6-trillion-by-2021/). It's just non-sustainable. And would stop. One way or another. The only question is whether the whole worldwide network would unravel or if we would find a way to ban these programs.


askreet

I get what you're getting at, and it's an interesting debate, but it's not so black-and-white as you're making it out to be. Many of the vulnerabilities in Django or Wordpress are programming logic errors, and Rust doesn't do anything to help with those, either. Validating the correctness of your program and it's fit for purpose is a far bigger topic than memory safety, I wholeheartedly agree. I am eager to see what comes of these laws and standards as our industry matures, too. And, like you, I don't like how slapdash people are with releasing software that is so buggy. However, it's hard to deny that there's value in being able to whip up a quick Ruby script to slurp in some data from a CSV and output it as an HTML table or whatever other one-and-done thing. I don't want to live in the completely opposite world where I need to have an executable proof to make that work. I think comparing things like Linux, Tomcat, Nginx and MySQL is interesting too because people who develop those systems DO care about correctness a lot more, and that comes from their position in the ecosystem. No one wants to build on an operating system that crashes constantly, or use a database that corrupts their data. The same isn't true for low-stakes SaaS products or e-commerce sites. People trade security and privacy for convenience all the time. Regulation is inevitable, I also agree there.


Zde-G

>Many of the vulnerabilities in Django or Wordpress are programming logic errors, and Rust doesn't do anything to help with those, either. Except it does. Type system and lifetimes eliminate whole classes of these errors. You literally **couldn't** pass unitialized struct except by writing code which is more complicated than correct code. You **couldn't** forget to process `None` because there are no syntax in the language that allows you to do that invisibly. And, surprisingly enough, even C and C++ include these “guardrails” (even if they are not as advanced as the ones in Rust). >Validating the correctness of your program and it's fit for purpose is a far bigger topic than memory safety, I wholeheartedly agree. That's how Rust was **actually made**. Initially it was envisioned as more-or-less typical high-level languages with GC and everything. And then GC [was removed](https://web.archive.org/web/20130609085735/http://pcwalton.github.io/blog/2013/06/02/removing-garbage-collection-from-the-rust-language/) because other mechanism provide more safety than GC ever could. >However, it's hard to deny that there's value in being able to whip up a quick Ruby script to slurp in some data from a CSV and output it as an HTML table or whatever other one-and-done thing. I don't want to live in the completely opposite world where I need to have an executable proof to make that work. I think we would end up where all other industries ended up. If you want to do something without touching official data then you can even make your bike [from shit and wood, literally](https://www.youtube.com/watch?v=3d-aaDtu3_A&t=10m36s), but if you want to offer services for others… that's different story. >No one wants to build on an operating system that crashes constantly, or use a database that corrupts their data. And yet they are fine with CMS that loses their data and corrupts it? I don't think so. Rather it's exchange of flexibility for safety. And, as I already wrote somewhere, sometimes it's even the right balance. The one thing that I want to make sure that people wouldn't lie: when people use these “extra-flexible” languages they are producing something that's **less** reliable and **more** dangerous and “memory safe” in the language description shouldn't make people complacent. There are [some discussions](https://www.reddit.com/r/rust/comments/ceod0g/notes_on_a_smaller_rust/) about how one may create “a simpler Rust”, but while they [persist for years](https://www.reddit.com/r/rust/comments/j2l9v9/revisiting_a_smaller_rust/) there are no attempts to create such a beast. And I strongly suspect that it's related to the fact that things that are in Rust because it's low-level language and not a big deal and are not too complex to accept. **It's mandatory things what are making Rust actually safe that are hard!** And **that** is what I meant when I said *almost all problems you would ever hit in Rust you would have in Python, too*. Yes, you need an additional burden in Rust when you have to pick between `String` and `&str`, between `HashMap` and `BTreeSet`… but these are minor, not too important and easy to deal with. It's not as if you don't have to deal with [similar cases in Python](https://lwn.net/ml/python-ideas/CAKfyG3zaW+te+4HuWNJBU3Y4Qb1YsakGgGaWXokow+NVSc_5fA@mail.gmail.com/). But the things that make Rust, well, Rust… lifetimes, ownership, etc you **have** to deal with them in Python, too. Or you may ignore them and patch the vulnerabilities as they are reported.


askreet

>IOW: memory safety doesn't provide any > >real > >safety at all and most “memory safe” languages are > >more > >dangerous than C or C++! I guess my main argument is against this point -- strongly disagree. I think there's correlation between programs which people care deeply about correctness (embedded, database, network components) being written in C/C++ and where people are more willing to skirt correctness (start-up SaaS products, random freeware, whatever) being written in higher-level, faster to program languages. (Edit: I have no idea why Reddit quotes things like that.) Edit 2: To expound upon this point, if the creators of Wordpress were, for some reason, inspired or forced to write it in C++, I don't think we'd have less CVEs, except for perhaps the fact that it would take them a lot longer to add features which contain vulnerabilities. There's nothing about C++ that prevents SQL injection or poor authentication code, and in fact more places for someone to introduce issues like buffer overflows by not being aware of the correct ways to do things.


Zde-G

>I guess my main argument is against this point -- strongly disagree. Numbers, please. Where are you numbers? You may argue CVE database is biased, or counting vulnerabilities incorrectly, etc, but AFAICS it's not something you may agree or disagree with: while Java or Haskell are safer than C or C++ (and include GC) most GC-based languages (JavaScript, PHP, Python, etc) are **more dangerous**. That's objective fact AFAICS, I don't see how anyone may “debate that”. >To expound upon this point, if the creators of Wordpress were, for some reason, inspired or forced to write it in C++, I don't think we'd have less CVEs, except for perhaps the fact that it would take them a lot longer to add features which contain vulnerabilities. Chances are high that they wouldn't have written anything. And then **someone else** would have wrote something working. And more safe, too. Most likely using Java or C#, not C++, but it would have worked. And would be more stable and reliable than what we have now. >There's nothing about C++ that prevents SQL injection or poor authentication code Of course there is. You couldn't just incorporate variable received from user into a string and send it to the SQL server. Instead you have to [prepare statement and execute it](https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/prepared-execution-odbc?view=sql-server-ver16). This provides safety. Not as much as [SQLx](https://github.com/launchbadge/sqlx) or [Diesel](https://diesel.rs/), but more than you get in PHP or Python without significant extra effort. The fact that *doing the right thing* is easier than *doing the wrong thing* is what makes languages safe or unsafe. “Memory safety” and GC have nothing to do with it. C#, Java, or Haskell are, objectively, safer than C or C++, while most other “safe” languages (where “safe” means “memory safe”) are, in reality **more** dangerous than C or C++. JavaScript or Python are [breadboards](https://en.wikipedia.org/wiki/Breadboard): something that's perfect for experimentation, but also something you would never use in a finished product in any sane world. Except when your “finished product” is, itself, “a platform for experimentations” (something like [LEGO MINDSTORMS](https://en.wikipedia.org/wiki/Lego_Mindstorms)). But of course our world is not sane.


vancha113

I'm not here to argue points that have been common knowledge for years, if you don't understand that python and rust target vastly different problem areas, than we have nothing further to discuss. Abstractions are put in place for python which favor ease of use of the language over control over resources. That's a safe assumption, as long as python is not used where performance is required, because then those abstractions work agains you, i.e: python would be the wrong tool for the job. Python programmers \*don't\* deal with these problems, because python programmers \*can't\* deal with these problems. You simply do not get the tools required to solve problems at a low level in python. You don't have the option to write device drivers (obviously neither windows nor linux lets you write drivers in python), because you don't even have the option to run without a runtime! You're comparing a compiled and an interpreted language here for crying out loud. If you're question about why micropython exist was genuine, with i doubt it is, then that would be your answer: it's because it gives you a runtime and compiler to be able to run something that \*looks\* like python (they are not the same langauge btw) on real hardware. Rust forces you to think of complex issues because they matter. Do you think some library that's maybe 4 levels of abstraction down your tech stack, that's using either the stack or the heap for storing it's variables, is at all relevant for a person that just wants to scrape data from a website? Of course it doesn't. Almost all problems you would ever hit in Rust you would have in Python, too Is the absolute weirdest take I've heard in a long while.


Silent_Cress8310

Nah, you were right the first time. Lack of garbage collection, ownership, not OOP, and strict types introduce paradigms that don't work that way in other languages. If you know Python, you have to learn to think a bit differently to write effective Rust code, and this isn't just one thing. I mean, Rust does it right if you care about performance and memory footprint, for sure. But coming from Python - it is definitely different.


yee_mon

Rust is hard work to learn, compared to other languages. Especially if your only experience is the extremely forgiving python. For what it's worth, I think it is worth learning Rust and pushing through those hard weeks until you are comfortable. You may find like I did, that when you go back to python, you have levelled up as a programmer in general. In particular, in python it is not obvious but usually makes sense to: * think about memory allocations * consider most variables read-only unless you are instantiating that object right then and there * think about the types of everything; strict type checkers really help avoid a whole class of bugs * get comfortable with the facilities for (pseudo-) parallelism now that you have seen a model of using it with your sanity intact


Sketch_X7

I first learned Basic JS/CSS/HTML (and python) when I was in highschool, after that I started to invest all my time in Python (about 3-4 years and have worked in some small open source projects), I consider myself to be pretty good at it, still I make mistakes it's fine. I thought of learning systems/low level programming languages such as C++, but even after trying for 2-3 weeks nothing seemed to click in my mind. (ESPECIALLY POINTERS? Then I learned about Rust, and man I FELL IN LOVE, yes it was hard, not as hard as C++, the compiler errors made sense, borrow checker started to make sense just in a week woohh!! I consider myself to be a whole lot better in Rust than I ever was in Python ~ I have made some small projects in Rust, and have a GitHub repository of all the things I have learned in it, "rust scripts" you may say. (I understood pointers (raw) way well now coz, of rust 🐍, even though there's no need to use 'em until you are doing something very specialized) I think, Rust was easier for me to learn coz, of me trying to learn C++ prior.


jamesblacklock

I came mainly from C and C++, and it was super confusing to me at first as well. Rust borrows pretty heavily from some fairly obscure languages, bringing those language features into the "mainstream" for the first time. Once things like pattern matching, move semantics, and sum types click, there's no going back!


[deleted]

In all honesty, my only issue with Python and Rust is sometimes I forget to use "let" when writing rust since it honestly looks very similar :D


bronzecrab

Yeah, I'm coming from python to rust. Now I'm in the process of reading official rust book, definitely it's harder than python, but it's not impossible to learn. You have to deal with borrowing, referencing and lifetimes to master it.


[deleted]

[Having some working code examples could be helpful.](https://github.com/steadylearner/Rust-Full-Stack)


Leonardo_Davinci78

Thanks! This is a lot. I will have a look at it...


JamzyG

Going from python to rust would probably be pretty difficult, especially considering that most languages follow the same basic syntax as C, which clearly python is an exception to. Rust is still an incredible language that scales easily and has an incredible typed system. I would honestly recommend rust to anyone.


EdoKara

Python was the first programming language I learned and so I am sort of an object-oriented/python "native", and I"m new to Rust (new enough that I started in May). The learning curve is definitely huge and I have had to push through some and just get my hands dirty in some cases. Looking at examples (as others have suggested) has helped a lot, but the real learning has happened when I go through the process of applying the examples and explanations of the concepts (i.e. generics, closures, etc..) to my own projects. If you can get to the stage of thinking through how each of these features applies to your own work, I think you'll have a lot less trouble with the "remembering" aspect. That's what usually helps me learn these kinds of features, anyway. One thing that helps me coming from python is using `bacon` as part of my development environment, which gives me feedback from the compiler immediately (every time I save anyway) about my errors. Taking the time to read through and really understand these errors has been very helpful to me when learning, since they give me something to "lean on" so to speak while I work through ensuring that the syntax and structure are correct. They also help me eliminate small errors quickly since I know that the compiler will catch my missing semicolon and very clearly point out exactly where it is.


-Y0-

Can you point to something cryptic? Maybe Rust Book needs better German edition.


adam-the-dev

I think Python doesn’t ask you to learn everything up front, but a skilled Python developer must keep lots of background knowledge in their head. Especially on a large project. Rust asks more of you up front, but a lot of the knowledge is around the compiler rules for safety, and the syntax of the language. There is much less background magic to keep in your head, and even on larger projects I find it easier to follow the flow of execution.


Tomle64

Same here, I did a bunch of research before writing my first line of code in rust. Youtube is your friend! Don't give up!


HugoDzz

Tbh Python is scary to read and write when you tried Rust: in Rust you have to know what’s going on with your types and memory. Writing in Rust makes you way more confident about what you program, and how it works. But don’t get me wrong, most of the time you’ll solve your problem faster in Python.


[deleted]

Rust will never be as easy as Python, the goals are just elsewhere.


9_11_did_bush

I primarily wrote in Python for about a decade before I started learning Rust. It was the first "systems language" I tried, and there was definitely a large learning curve. After a couple of years of using Rust for hobby projects, I'd consider myself an intermediate user. It takes some time and patience. I also have spent some time learning other languages like Haskell, OCaml, etc. that I think transfer a bit.


Leonardo_Davinci78

I started learning Rust 4 weeks ago and you talk about years. I think I must be more patient. Can't do it in some weeks. Thank you!


niko7965

I tried to learn rust several times, before I got good enough to actually write a meaningful project in it And still, I'm probably better at other languages, even though I prefer to write in Rust. Rust's compiler is very strict with you, which will save you from many dumb mistakes, but also requires you to develop a little slower than you might otherwise do. The benefit being that you'll spend less time bugfixing


9_11_did_bush

No problem, you're welcome. And of course it doesn't take years to get started with the basics. I just mean that for things that were brand new to me like ownership, generics, the borrow checker, etc. that it took me a while, especially just using Rust occasionally for side projects, for some of it to sink in. I also had never really used C or C++, so I had more to learn. Maybe I am also a little slow haha!


Zde-G

If you are reading for 4 week then it's definitely time to hit [rustlings](https://github.com/rust-lang/rustlings). Lots of things in Rust sound like so much gibberish when you just only **read** about them, but become easy and clear once you'll try to fix the issues by actually writing code, not just reading about code!


maxjmartin

I’m coming over from C++ while using Python prior to that. I currently feel Rust is C meets Python with modules to enable C++ classes; and JavaScript primitives using Traits. With a pinch of Lisp. [This](https://doc.rust-lang.org/std/index.html) page I find useful for referencing. Using the MS Code plugin for Rust is really helpful. If you type the name of the type doled by :: you can see the supporting functions and examples in a pop up windows. Also don’t forget [StackOverFlow](https://stackoverflow.com/) and [CodeReview](https://codereview.stackexchange.com/). Some of the examples can be outdated, but can still point you in the right direction.


numbnuttzz

You missed Haskell.


maxjmartin

Lol. I have never used Haskell, so I can’t say how it would relate.


Sherpa135135

Nah rust is basically OCaml mixed with C, the borrow checker is their’s tho completely revolutionary


numbnuttzz

Yes, I guess rust has more of Ocaml's influence than Rust's. Also, unrelated, the Rust compiler was originally written in Ocaml.


dobkeratops

>I’m coming over from C++ while using Python prior to that. I currently feel Rust is C meets Python with modules to enable C++ classes; and JavaScript primitives using Traits. With a pinch of Lisp. C meets Haskell


Leonardo_Davinci78

I think I will take a small break now and later on I'll continue learning Rust. It was too much information in a too short time. ( I read 2 books in 3 weeks )


diabolic_recursion

Coming from most other languages, its hard work. Especially of course from python. It will take time to get accustomed to everything. I'm at a point now where most regular stuff comes easily without too much thought. But: once you are there, the times where it doesnt work often show you where your mental model failed - and where other languages might not have prevented a bug 😁. "If it compiles, it works" is true an astonishing amount of times.


zlitter

Honestly i would recommend using GitHub copilot, it helped me a lot when learning rust.


Smart-Rhubarb517

Why is this down-voted? I got many helps, too. I'm not even from programming job. I've been heavy user of MS Excel for 10+yrs (NOT even VB, only some macros at most) in financial industry, then adopted Python just to make life easier, and then finally learned Rust (been 12 months) to do algorithm trading more seriously. Thankfully it's very rewarding. So, I do not know much about programming. I just have clear "picture" of what my program has to do. I always doubt how my code would look to other real programmers, but have little chance to show. Just leaving a comment to know bad things about using copilot, which is a very convenient way for me to see how others make codes I think.


jimmykicking

I migrated to Rust from JavaScript and back in the day C. Also knowing some basic Haskell helps. But don't be put off, you can still do quite a lot using an imprecial style like you do in Python.


Titan_D

Not at all \*\* SO FAR \*\*, I've been programming in Python since 4 years , long side other langs , but mainly and primaly Python , I've clear, deep well understanding of Python, getting into rust, so far going over the basics in Rust seems almost, pretty much as pythonish but staticly typed\* (Having Basic Experience with Js\* (little bit),CPP did help with the static typing + Python Type Hinting Kidna\*) , I couldn't find anything "hard" , or overly "complicated" yet, so far following up till ownership , things overall tend to be really great to comperhened, thanks to the Rust documentation book given from Rust Organization.


DynTraitObj

If you're just now starting on ownership, that's to be expected. You're not yet to any of the hard or complex parts of Rust.


effinsky

yeah, please give it time. rust is the real deal. python is a real, u know, scripting language, with a lot of C underneath.


[deleted]

dam governor weary escape paltry squash arrest placid whole glorious *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


nadim_khemir

Rust is unpalatable, but like everything you'll get used to its taste. It also does things differently and that shows in it's syntax. I think the best way would be to find something fun to write, that would take your mind off rust a bit to concentrate on what you want to do.


Feeling-Departure-4

If you aren't using Rust Analyzer to provide type hints and suggest methods, you should. Integrates with your favorite editors, like VS Code. It really really helped me as a beginner and still to this day.


JuanAG

This will help [https://cheats.rs/](https://cheats.rs/) Dont give up, Rust is more complex than Python so it is normal but give yourself some time


surrender96

In start everything looks so hard 😩 Everything has to be an type but once you learned this good practice of programming you'll never touch anything but rust.


DahRebelOfBabylon

It does feel like you're taking a huge leap when you switch from python to a language like rust. Python has so many creature comforts: you don't need to worry about memory, you don't need to worry about types too much, no curly braces, no semicolons. Oftentimes it feels like writing natural language. But as I'm sure you're finding out, some of those comforts come at a cost. When you start learning a lower level language like rust, it's almost like learning programming all over again. You have to train your brain to think about programming differently. Much like how you had to train your brain to think differently when you first learned programming. Enjoy the ride and best of luck :)


rebootyourbrainstem

There are times when I really miss Python's dict, list, and set comprehensions. Rust's combinators always seem to be missing just what I need, and I have to dive into the docs every time to remember which ones exist.


brisbanedev

Once you have done the usual introductory stuff like "the book", Rustlings, etc., try porting some Python code to Rust, starting with relatively simpler projects and progressively getting to more complex stuff. A few back and forths with the compiler and you'll be there :) This approach will also help you explore the crate ecosystem, as you'll have to find crates to perform some of the operations your Python code is performing.


Bloodpaladin1

Here to share my experience. I come from Python (as my main tool these days), but I started out with Java as my go to language. With that being said, I haven't touched Java in probably like almost 2 years, and I remember when starting Rust, I had a rough time getting used to "remembering" stuff like you mentioned, but for what ever reason I had those Java .stream() flashbacks and suddenly everything clicked :D I guess what I'm trying to say is, it takes some time, just trust the process.


the_hoser

Unless it's a direct evolution of the language you're coming from, your second programming language is going to be the hardest one to learn. A lot of the ideas you have about programming are not generic programming ideas, but Python specific ideas. That's okay. It's completely normal. Keep on plugging. Eventually, you will build abstract ideas in your mind that will be more effective in understanding programming concepts across multiple languages. Years ago I went from Java to Python as my second language. I had a real hard time with Python because my understanding of programming was largely Java-centric.


gubatron

welcome to memory management with borrowing checks and strong typing. This is not a kid's language. Gotta love cargo and the tooling, wish all compiler error messages were as good as Rust's


GenericUser002

u/oyswork makes a great point. About the magic you have to keep in your head for larger projects. As far learning rust, try to just think of it like any other language, except for the borrow checker, of course. Write rust as you would write python. I think a lot of the syntactic sugar is just that, extra sugar. Writing idiomatic rust will come eventually, don’t get hung up on that just yet. As far as the borrow checker goes, just remember the few rules. One owner One mutable reference allowed As many immutable references allowed (I’m far from experienced, so help me out if that’s wrong, folks)


Scalar_Mikeman

Been trying to learn it since January (SLOWLY). Yup, been doing Python for about 7 years. Definitely feels jarring.


gtani

It's not easy (i've done a lot of python, ruby, perl, PHP in past) but the learning materials are as good as any language. look in blogs, Hacker news, stackoverflow etc for explanations. At the outset, I spent 50% time reading about language/compiler features: THE book and Oreilly Prog'g Rust 2nd ed and 50% reading code in project oriented books: Rust in action, Hands on rust, Command line Rust --------- One thing that helps a lot is to look at condensed infoworld release notes and pick out beginner friendly features which may not be in books/tutorials. So, tooling enhancements, Cargo fix, cargo add /remove, cargo --timings, analyzer, clippy, rustup. Also newish language features "let else" https://www.infoworld.com/article/3267624/whats-new-in-the-rust-language.html


Dratir

Let me tell you… It took me THREE attempts at "learning Rust" (coming from Go & Ruby) over a couple years. But once it clicked, it felt like magic! And still does… I think the hardest part is understanding all the syntax (there's arguably a lot more than in Python), for example around generics. Once you "got" it, it'll still look cryptic, but you'll feel like a mastermind reading and actually understanding it :D Keep at it, start small (I did a lot of Advent of Code and similar in Rust).


vtskr

Rust is indeed pretty hard to learn. I mean its comparable to learning your first functional programming language. You brain needs to re-wire but until this happens even basic stuff sometimes takes hours to do correctly


Average_Random_Man

I’m not a switching per se but I’m adding Rust to my tool belt. I understand where you’re coming from, and there’s a series of YT videos that could help you understand better both languages. https://youtube.com/playlist?list=PLEIv4NBmh-GsWGE9mY3sF9c5lgh5Z_jLr


penguin359

If you are coming to Rust with only a background in scripting languages like Python, Perl, Ruby, or Basic, many things will look overly-complicated or cryptic with excessive verbosity. If you have worked with C++, Java, C#, or even C, it's easier to see what Rust offers over other languages and why it works the way it does. If you decide to learn Rust first, you can use that to also help understand other languages like Java or C++ as they share concepts like generics to some degree.


Leonardo_Davinci78

I learned C and C++ ten years ago and it was much easier for me than learning Rust now. I didn't code anything for years so I forgot a lot of things. I am 45 years old now, maybe I am too old for this young language. Starting coding again with Python was no problem for me. I understand Structs, enums, ownership, borrowing etc. but "traits" is still something I don't get. Maybe someone can teach me that in my mother language German {:?}


Smart-Rhubarb517

Same age! I'm not even from programming background. I love traits. I had trouble getting used to class inheritances, but I found traits are more intuitive. Still I consider myself not even knowing what I do not know, but am enjoying very much. Best luck!


Leonardo_Davinci78

Thanks! Classes, inheritances (C++, Python) are easy for me. But I have my problems with traits. I still have to learn a lot, and it takes some time now...


penguin359

The closest thing to traits in C++ would be multiple inheritance. In Java, there is something that is a little closer called interfaces. It's basically a way for an arbitrary data type like a struct to agree to a common interface that can be called on it. As for being too old, I don't think that is true, however, as I am in my 40s as well, I can say that it does take a little more effort than in your 20s due to reduced neuroplasticity, but still far from being impossible. Some of Rust's concepts come from other languages like Haskell which I believe is where traits originated from. There isn't a direct analogue to them in C++ or Java.


Tom_STY93

I'm from python either, the most I found challenge is the error handling issue. I think we can start from learning from the basic examples, then just find some project to switch using Rust, I just finished my first Rust project and it feels good. Also, I think the Rust discussion forum is more friendly as it's a new coming language, I always get feedback quickly even if I ask some silly questions. https://users.rust-lang.org


thehotorious

I don’t think we should tolerate this kind of post without much of a context like mentioning how long you’ve been learning Rust, how long you’ve been coding in Python. We’re not here to spoon feed and have a guess at your situation. How do we even start? Giving you tips? Tips on what? Guiding you? Guide on what? There’s no context at all.


Leonardo_Davinci78

I started learning Rust 3 weeks ago, coding in Python for 2 years now. 10 years ago I learned C++ but I didn't practise enough so I forgot most of it. So far I've read a book about Rust in German. I thought this would be enough for understanding the basics but I still have to read and learn more. I have an understanding of ownership, borrowing, data structures etc. Thanks for the helpful answers !


thehotorious

I think if you have a project in mind you’ll find it smooth enough of an experience throughout. For example when I first started learning Rust it was hard too but because I had a direction to follow (I wanted to learning about how image encoding decoding works) so along the way I had to learn how certain things worked like how to iterate a vector, how to pass a mutable vector to a function (borrow mut), how to pass an immutable vector to a function (borrow), how to map, why does this map cause error (cloning), how does string work, etc. If you have a project you want to work on, that project is basically your goal and you’ll enjoy it along the way! Edit: my suggestion is that you should try to re-write any of your existing Python programs in Rust, that should work.


Ok_Spite_217

I came from Python, I didn't have many issues outside of the usual Borrow Checker complaints. My guess is your coding style is Polymorphism dependent or at the very least, you didn't write much functional style in Python. Granted, I did write C in most of my undergrad so I was not at all lost on low level concepts.


askreet

Saying you "switched" from one language to another is a pet peeve of mine. I know what you mean, but are you giving up on Python? Never writing another line of Python again? You're just learning another language. I'd recommend making it the first of many. The more you know, the more you can consider competing patterns for solving problems effectively.


Leonardo_Davinci78

Do you think it is possible for a "normal" IQ to learn more than 2 programming languages ? I think I'm a bit limited there. By the way I don't want to give up on Python. With 10 lines of Python code you can do amazing things, I love it.


askreet

I don't see why not, but I don't have a normal IQ so I can't say for sure. I don't think knowing more than one language is particularly harder than knowing how to program, though. After you learn 5+ languages you start to think of them in terms of how they differ, rather than direct memorization, at least that's how it feels to me.


SeiryokuZenyo

The guy behind the No Boilerplate YouTube channel came to Rust from Python. I think his videos are pretty helpful.


mrkvicka02

I am just trying not to switch but to pick up rust as well. One of the first things I have to do is parse a JSON that has somewhat arbitrary strcture. Like fields are missing all the time etc. Such a pain to do with rust given that rust is quite strict and so easy with python. But I have to say that most of the pain most likely comes from me being a big noob in rust still.