Hacker News new | ask | show | jobs
by b4je7d7wb 1243 days ago
I've been making a 2d game in bevy and it's a lot of fun. I would recommend trying it. I haven't had any issues that are common with rust like fighting the borrow checker.
1 comments

FWIW, I think people mostly have these issues with async code, because the syntax is reminiscent of Python or Typescript, but actually behaves very differently under the hood. So, the similarity is only superficial. Most of the time you don't care about this difference, though. However, sometimes it can pop up. Funnily, I think like 80% of the time, you can just reorder code a bit to not hold stuff across await boundaries, and it will compile. The 20% can sometimes be tricky, though (often because working with external types, so to resolve it, it requires wrapping code).

The situation is getting better, though. Just not with every release.

I imagine work on async needs to be slow and more methodical due to how it interacts with the rest of the language. So a lot of language features are being added to support it more ergonomically. However, those features are also being designed very carefully, and as a result they ens up being just overall great boons themselves too.

So, tldr: async can suck a bit, but slowly getting better, and as a result it's making the rest of the language better too.

I don't think some people who complain about async in Rust don't truly appreciate how "high level" it feels and how unobtrusive—for the most part—it is for a systems programming language!