12
netikras
41d

Genuine question to rust devs: is rust worth it? I'm helping devs on a rust project and every day we're swearing at it. The language, critical section control, broken libraries, etc.

To me it seems we would have far better off with golang. But since we are this far now, noone will admit it

Comments
  • 4
    to Rust devs and retoor! I have no idea but how it handles its safe memory is explained here: https://youtu.be/PG0wRb7eYms/.... Ok, that's not per definition unsafe so... It's ok :) Amazing trough how much hoops people will jump because it is possible to write unsafe code with some other language. Writing such code just to avoid manual memory management, something that is possible to learn after some dedication. But nooo, they want to have the same with less effort! Lazy bastards :)

    While my favourite product (molodetz.nl) is written in Go, Go is not really something often chosen right? No idea why tho. But it seemed to have a relatively short fame a few years ago. Kinda Rust level back then.
  • 1
    @retoor but go IS chosen quite often... :)at least around me
  • 6
    Depends on your problem. Some things Rust is great at and others it's a pain

    Also depends on what kind of devs you team has. Rust is more in the direction of haskell autists. I.e. if you just wanna quickly get something working no matter how ugly or fragile, Rust isn't a particularly great choice
  • 3
    If you're a good programmer working alone, you don't need the safety it adds. If you work with others and think some of them are idiots, rust has some benefits.
  • 2
    @atheist Might also have disadvantages if the others hate you for using it lol
  • 6
    @atheist That's actually one really common thing: One knowledgeable, enthusiastic guy pushes their team to make the next project in Rust. Then they figure out it's not that easy and then they are all frustrated and curse rust and hate it

    Heard that quite a few times
  • 3
    @12bitfloat the problem is its easy to make the next thing in JS, hard to maintain.

    It's easier to maintain typescript but if anyone asks about performance or why you're using 1GB of memory, you're cooked.
  • 3
    Every Python dev knows Python is OK but not great. We've consigned ourselves to our fate.
  • 3
    @atheist Yup. Unfortunately if you're in a team, chances are that you have a bunch of devs who aren't that passionate. And they'll hate Rust even though in the end it would be a benefit, and then they sour the batch for everbody
  • 1
    @retoor Just finished watching the linked vid.

    I think I should install COSMIC...

    ...but is it beta ready, though?

    /jk
  • 1
    @D-4got10-01 I do not really like the result but love the concept of dwm window manager it's just 2k lines of source code with the idea that you finish it yourself.
  • 3
    @12bitfloat my first job out of uni I was in a company of 15 people, almost all devs, super passionate and insanely competent people. I learnt insane amounts and it's why I'm such a good dev now. And now I work in a shitty team that's fine with half assing it and that's my biggest learning experience. Need to change but life is complicated and a bit of job security has its advantages.
  • 2
    when I come back to code I wrote in it it doesn't confuse me and that hasn't happened in other languages

    writing anything in it is ridiculous though. it's very nitpicky, and you can't do what you can in other languages. so you're basically stuck relearning how to code from day 1 all over again and also it'll be much slower for you to catch up on and this feeling seems to never stop
  • 3
    I keep trying to use it for prototyping and that's a fucking disaster
  • 1
    @jestdotty The nice thing is though that once you've learned how to write in Rust your code in other languages will likely also be a lot better

    But it certainly does take a long time to become truly good at rust. I've been using it since 2018 and only in the last few months do I feel like I don't hate my Rust code.... BUT I've also started writing simpler code ("simple", not "bad"!) without trying to overengineer. That helped A LOT in Rust
  • 2
    @12bitfloat why would learning Rust be good for other languages? It's not like that other languages are based on it or so.
  • 1
    @retoor Because you learn how to structure code in a simple yet robust way. You also learn a lot about correct multi threading

    And more than anything else, you truly get a new perspective on coding. Something you cannot get from only C like languages because they are all too similar to eachother
  • 0
    @jestdotty No thats not what I'm saying at all. That's just bad code. Good code shouldn't be complicated!

    Have you guys never used a truly different language like ocaml or haskell? Something not C-like

    It's so enlightening stepping out of your comfort zone
  • 2
    @12bitfloat yeah I try to write things simple and pace myself

    but I have big dreams so this is annoyingly slow. also I'm not anywhere near this incompetent in all the other languages. I have brain damage though so I can't tell how much of my struggles with rust is the brain issues vs rust being hard and rust's fault

    def learning something hard that few can do, especially if said tool is being propped up by big tech and governments, is gonna be damn good job safety. and rust salaries are crazy compared to all the other languages
  • 2
    @12bitfloat rust code is complicated by its nature. the structures and patterns you have in rust are themselves complicated and all the borrowing stuff means you have to make architecture complicated to accommodate it. of course once you get it it doesn't seem so complicated but the "solutions" to those problems are not intuitive for the human brain, which is why people struggle with "getting it"
  • 0
    @jestdotty I get you. Rust is certainly complex by nature. But.. it's also pretty pragmatic. It's not a complete nerd language like haskell. Rust was made to solve problems

    It's complex but not by choice like haskell. It's as complex as it is to solve a big issue: Memory safe low level development. But in addition to thatthat (which does result in quite some complexity) there's just so much nice stuff Rust has to give which no other language has ever given me

    I'm honestly still in the honey moon phase with Rust even after 7 years of using it. I don't know maybe I'm just weird but for me it's just such a beautiful little language
  • 0
    Every Python dev knows Python is OK but not great. We've consigned ourselves to our fate.
  • 0
    @jestdotty Yeah but what's the downside after having gone through the painful learning part? You almost say it like it's bad to get sucked into Rust

    I can write super fast and memory safe programs now, so I'm happy with it
  • 3
    To me, memory safety is just one feature of Rust. It also comes with a convenient package manager, very explicit errors, performances at C level.

    But this has a cost. Rust is not only opinionated, it is authoritarian, and as mentioned by @retoor this doesn’t prevent doing stupid things.
  • 0
    @Tounai Very much agree. But what people often don't see is that Rust is pretty pragmatic aswell. People always think Rust does it the hard way because why not. But really, it tries to be as nice and helpful as it can
  • 0
    @jestdotty In the beginning definitely. But it's a one time thing, so personally I'm not that mad about it
Add Comment