Live data from Hacker News

Leaving Rust gamedev after 3 years

loglog.games

31–40 of 996 posts

Re: Leaving Rust gamedev after 3 years

#31
post #11

Earlier quoted context omitted.

I think most people here understand that a language that is great for kernel development isn't necessarily great for everything else.

I work fulltime in Rust (embedded stuff) but actually think the "everything else" influence into Rust is stronger than the systems stuff, and it's harming the ecosystem. Just try finding e.g. an MQTT or WebSocket or etc library that doesn't drag the whole mammoth tokio ecosystem (which is really geared for Web Scale! projects) in with it. Rust is becoming the language that tokio ate, and Cargo/Crates.io the new NPM.…

I used Rust professionally up until this year (since before async landed) and IMO you've hit the nail on the head. The shoehorning of async into the language and ecosystem seemed to be driven by the belief that if Rust can't attract Go or Python developers then it will fail. In fact Rust was doing fine in its niche attracting C++ developers and trying to make it everything to everyone has diluted what was great about it.

(That said, your example might be a bit exaggerated as I found mqtt libraries that don't require tokio).

Re: Leaving Rust gamedev after 3 years

#32
post #24

My impression of Rust is that it's a very opinionated language that wants everybody to program in a specific way that emphasizes memory safety above everything. That's a good idea, I think, for the systems programming use cases that it was intended for. I don't see that as a particularly useful thing to value for game development. The part in the article about the Rust borrow checker constantly forcing refactors soun…

IMO it’s not opinionated enough. Golang for example doesn’t let you customize go fmt, while Rust does. Rust also has many ways to do things in general (mod.rs vs name_of_folder.rs for example) and seems to not want to provide a useful baseline for most projects via its standard library (unlike Golang).

But to go back to our subject: Rust is a great language and that’s all you need. I wish I could use it with unity.

Re: Leaving Rust gamedev after 3 years

#33

Unity is so good and quite affordable, basically there’s zero upfront risk of using it. Similar for Unreal Engine. And then there are tons of other open-source engines like Godot that are also quite good. Rust is great from lots of stuff but game development or building UIs isn’t among that (yet).

> Unity is so good and quite affordable, basically there’s zero upfront risk of using it.

Other than the absurd license changing shenanigans they tried to shove through recently. Hopefully they learned their lesson.

Re: Leaving Rust gamedev after 3 years

#34
post #26

> The problem you're having is only a problem because you haven't tried hard enough. You just need to read another 50,000 word fasterthanlime essay. Then you'll not have problems any more. > That being said, there is an overwhelming force in the Rust community that when anyone mentions they're having problems with Rust the language on a fundamental level, the answer is "you just don't get it yet, I promise once you g…

>> The problem you're having is only a problem because you haven't tried hard enough. And it actually does work that way with Haskell, in my experience. There's a big hill to get over where you flail against the type system, IO monad and all, and then you realize that, while Haskell's type system isn't perfect, being able to say Num t => (t -> b) -> [t] -> [b] is really pretty powerful, and being able to search for f…

Maybe https://dev.epicgames.com/documentation/en-us/uefn/verse-lan... is as close as we're going to get to game dev Haskell.

Re: Leaving Rust gamedev after 3 years

#35
All low-level languages (by which I mean languages that offer control over all/most memory allocation) inherently suffer from low abstraction, i.e. there are fewer implementations of a particular interface or, conversely, more changes to the implementation require changes to the interface itself or to its client [1]. This is why even though writing a program in many low-level languages can be not much more expensive than writing the program in a high-level language (one where memory management is entirely or largely automatic), costs accrue in maintenance.

Now, a language like Rust makes some aspects better because it ensures that the maintenance (refactoring) is done correctly -- reducing the risk of mistakes -- but it comes at a cost: you must explain your handling of memory (before and after the refactor) to the compiler (plus, the compiler doesn't understand all patterns). I think it's too soon to empirically compare this cost to the gain in reduced risk and determine when each option is more or less advantageous (and perhaps it is also a matter of personal programmer preference), the fact remains that maintenance of programs in all low-level languages is always more costly than maintenance of programs written in high-level languages because of the low abstraction inherent to all low-level languages.

When writing in a low-level language some may prefer the Rust approach while others may prefer less restrictive ones [2], but people choosing any low-level language should be aware of the added maintenance cost they're invariably signing up for. Sadly, this cost only becomes apparent at later stages of the project.

[1]: Some people claim that memory is just like any other resource (e.g. file descriptors), but this is incorrect. Memory and processing are fundamental to the very nature of abstract algorithms, and differences in how memory is handled change the available range of algorithms. E.g. finite state machines, queue automata, and Turing machines differ only in how memory is handled and accessed. In short -- memory and processing are special resources and are not the same as IO resources.

[2]: I'm personally not a big fan of Rust's approach -- and I particularly dislike C++'s and Rust's "zero-cost abstraction", which is the attempt to make the low abstraction ability invisible in the final code without changing its fundamental aspects -- but I recognise that people's opinions differ on this matter. I also reject the claim that there's no middle ground between Rust and C that offers an intermediate tradeoff between them, i.e. that there is no safety premium to a language that offers some of Rust's safety guarantees but not all of them, such as Zig, or offers better and effective assurance of some properties without a sound guarantee.

Re: Leaving Rust gamedev after 3 years

#38
post #29

Earlier quoted context omitted.

this reminds me of Lispen of ye olde.. wait untill it clicks, man!

Lisp is pretty normal if you're accustomed to, like, Python: It's a GC'd procedural language.

Haha, nice one! :-)

(can only assume you're joking)

Re: Leaving Rust gamedev after 3 years

#39
post #8

tl;dr -- Rust is not the language for startups who want fast iterations and are still finding it's pmf. It is perfect for rewrites of popular system software which already has millions of users and running in production because once a software becomes mature and at million user scale, safety and security becomes paramount

At million user scale, feature parity and compatibility is truly paramount and, `rg` aside, Rust utils don't have a great story to tell there. Such software has evolved in the course of decades and its (usually despair-inducing) code is tailored for dealing with a tremendous number of edge cases, platforms and architectures. Rewrites in Rust tend to write "the cool parts" and indeed write them better and faster, but that is just not good enough for replacing the standard tools.
Post reply on HN