this post was submitted on 27 Apr 2024
107 points (96.5% liked)

Rust

5966 readers
17 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

This was a really good summary of what Rust feels like in my opinion. I'm still a beginner myself but I recognize what this article is saying very much.

The hacker news comments are as usual very good too:

https://news.ycombinator.com/item?id=40172033

you are viewing a single comment's thread
view the rest of the comments
[–] kaffiene@lemmy.world -1 points 6 months ago (1 children)

I think you're wrong. But this is clearly an article of faith amongst rust developers

[–] asdfasdfasdf@lemmy.world 5 points 6 months ago* (last edited 6 months ago) (1 children)

What I said isn't even what I'd consider subjective. There is a very clear, logical, scientific reason for that. Not sure what you think I'm wrong about.

Can you give an example of why you think Rust just makes it needlessly hard to refactor?

[–] kaffiene@lemmy.world 2 points 6 months ago (2 children)

I've worked in game dev so I get the point about iteration. It's not about doing proper reactors - it's about quick hacks to try something out. When your hack is good, then you do it properly - or maybe not at all if the hack works.

The respondents here are acting like code must be at all times provably correct and and Rust is great because it helps with that. That is indeed very cool but it's SLOW when you need quick iteration. It's not that you need to quickly iterate the code per so, it's usually the game experience you're iterating and that doesn't actually NEED code to be perfect or even good.

[–] asdfasdfasdf@lemmy.world 4 points 6 months ago (1 children)

Ive used Rust professionally for six years now and have done many quick hacks. It is really easy to do. Basically just don't use references / clone everything to avoid lifetime and ownership issues, and use unwrap everywhere to avoid proper error handling. It's really that easy almost all the time.

The nice thing about that is once you're done with the prototype, just remove the unwraps and you can optimize stuff by removing the clones.

[–] kaffiene@lemmy.world 2 points 6 months ago (1 children)

Well perhaps my experience in game dev and the OP's are just wrong

[–] jcbritobr@mastodon.social 1 points 6 months ago (1 children)

@kaffiene @asdfasdfasdf Its slow when you dont know what youŕe doing. For example, build a linked list in #rustlang is different then build one in java, because you can´t leave the variables in a wrong state. It's only a different approach, not a slow approach.

[–] kaffiene@lemmy.world 2 points 6 months ago (1 children)

OK. I'm dumb. There are dozens of languages where I appear to not be dumb using so I'll stick to them I guess

[–] asdfasdfasdf@lemmy.world 1 points 6 months ago (1 children)

That's a sad attitude to have. Rust is really great, but it does have a learning curve. If you do want to give it a shot, just reach out online and there are many people who can help with suggestions.

[–] kaffiene@lemmy.world 0 points 6 months ago (1 children)

Yeah it's sad that I just want to get stuff done and use the tools that are actually good at that. Point me to great Rust gamedev tools that are actually getting used to ship great games and I'll give them a go. I think criticising people who raise valid issues about Rust in a context where it has no cut through and no depth says more about you, frankly. Programming languages aren't all good at everything and that's not a personal slight on you or the Rust communiry

[–] laund@hachyderm.io 0 points 6 months ago (2 children)

@kaffiene @asdfasdfasdf i think part of the issue is that one group of devs is saying "rust is great for gamedev" by which they mean its a great language to develop games which are closer to game engines themselves in, or even custom engines. Then another group says "no it sucks" but they are talking about the scripting approach, where you don't care what happens under the hood

Rust fits the first group well, and the second not at all, and the issue is that both dont see the difference between

[–] laund@hachyderm.io 1 points 6 months ago

@kaffiene @asdfasdfasdf by which i mean:

if you want to develop on the level of a engine, even if you're not makign a entire engine, Rust is IMO the most productive language. But these things also take a lot of time, which is why you don't see big games being finished. There are some like Tiny Glade where the devs built a entire custom renderer on the other hand.

[–] asdfasdfasdf@lemmy.world 1 points 6 months ago* (last edited 6 months ago)

Yeah, at this point I'm talking about Rust's fit as a general purpose language and being good at refactoring. I think Rust is great for both of those and that it isn't very subjective.

But regarding Rust for game dev, I have no idea. I have never done game dev, so it's definitely possible it isn't good for it for some reason.

I'm also saying scripting languages will break very easily when you refactor things. I didn't think that was that controversial...