Hello all,

I am a data center engineer of about 8 years now. I’ve spent the last 3 years or so slowly learning Python(I say slowly not because of my effort, but because learning Python was actually very difficult for me.) I am not an expert in any way shape or form, I understand the concepts of OOP, inheritance, classes, functions, methods, etc and I have found that the python documentation that can be found within the language is usually enough for me to be able to write the programs that I want to write. Very rarely have I had to write programs that have to bypass the GIL, but occasionally, I have created threadpools for applications that are not I/O intensive. What I’m saying is, for most things that I create, performance is enough with Python.

However, I have been inspired by how much love Rust is getting from the people who use Rust. I have tried to find some books for using Rust for network automation and unfortunately I have not been able to find any reputable books.

Most of the “automation” work that I do involves parsing data with regex, restructuring the data, converting the data into a modeled format and transforming something with that data. Does anyone have any common use cases for Rust that might interest me? Has anyone used Rust for network automation tools? With familiarity, can Rust’s intuitiveness match Python’s “from idea to deployment” speed? Or should I only learn Rust if I intend to create applications that need tight performance?

  • marcos@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    1 year ago

    Hum… “Powerful” is not a word I associate with Rust… at all.

    But it depends on what kind of “power” you want. Rust will give you lots of power about what kinds of things your programs do (and how performant they are), and not a lot about how to create your program with maximum productivity or minimum maintenance once your requirements change.

    In particular, Rust won’t give you a very good “time to first prototype” compared to Python. But it will beat Python on maintenance if your program gets large enough. The tools that make Rust more maintainable are available in other languages (Ocaml, Haskell), and if you are mostly writing parsers, those other languages will probably beat Rust on any metric.

    Anyway, be prepared to learn a lot if you decided to go with any of those 3 language, and remember that “learning” always comes with feeling you are not good enough or that the language “just can’t do this thing that is so easy on the one you know”. Those feelings are rooted on a very small truth (you aren’t good enough yet, and no, the new language does a different thing that is much better), just don’t let it blind you from the larger picture.