11

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
  • 1
    yeah I've seen some JavaScript code rust devs wrote... it doesn't even look like JavaScript. I've never ran into js code I couldn't understand (as weird as that may sound, but JavaScript was my favourite language for a long time and I learned every random thing you could do in it)

    so even if you can "code in other languages better" the people reading your code are gonna be left behind and unable to read your code because they don't know rust probably. even though you might be using less cycles, have theoretically better memory allocations and storage strategies, because you got used to optimizing code for rust
  • 1
    rust has some kind of... mathematical beauty to it. it's ingrained in the language.

    but if your brain isn't thinking in that natively or all the time I guess pain for you until you get it
  • 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"
  • 1
    @12bitfloat I met a dude once who said I should do Haskell, and he was the only competent person I had met irl. very few people use Haskell though. it's like a proof of concept

    Haskell is probably more complex than rust but it's also not really a usable language. it's a hobby project for top 1% ultra nerds. I once read functional programming and my question is just, why? just why. how about no? too much for no reason

    I like making things unlike these dudes. I'm not so autistic. I like functionality and usefulness. so I didn't bother learning Haskell. and yeah nerds talk about ocaml but those are the nerds. I can nerd but I don't nerd for no reason. for me everything must be useful or I'm disinterested and I rather spend my brainpower on something else; I'm not exactly at a loss of such things to choose from
  • 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
  • 1
    @12bitfloat not honeymoon. it's because you went through the pain to learn its lessons

    it's better but others wouldn't want to go through that pain

    it's like having to pay for admission. it's easier to stay ignorant, and unless you pay admission you can't judge it. so you won't be paying admission

    rust community figured this out though. they don't try to teach it to older people, they go for the young ones who don't know any better and don't have other languages clouding their heads. for other reasons, that's also the best way to do adoption for anything (like Disney products for example; acclimate them when they're young and they'll be customers for life). but with rust they have no choice but to do this because it's so different from everything else you won't have much luck teaching it to those already in the field. what annoys me is they don't even try to bridge that gap, but whatever
  • 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
    @12bitfloat downside is it cost you a lot of time and pain

    also I didn't say it like it was a bad thing. to me it's just facts
  • 0
    @jestdotty In the beginning definitely. But it's a one time thing, so personally I'm not that mad about it
  • 1
    @12bitfloat we are both in the years of the beginning

    just saying

    I don't even view that as bad. the whole reason I really loved when I found coding is the program could tell me when I was wrong. I was so bored as a kid otherwise. I was the smartest person for miles and suddenly this computer would tell me I'm wrong and it was right. to me it's comforting to be told I'm wrong (like, validly wrong, not just someone being a shit), it feels like someone is actually interacting with me at my level, and I can learn and get better for it. so it's quite rewarding

    but most people are just not gonna like that, is all
Add Comment