OT: Leaving Rust gamedev after 3 years
Dukc
ajieskola at gmail.com
Tue Apr 30 10:33:44 UTC 2024
On Friday, 26 April 2024 at 18:41:11 UTC, ryuukk_ wrote:
> https://loglog.games/blog/leaving-rust-gamedev/
>
> Discussion here: https://news.ycombinator.com/item?id=40172033
>
> We should encourage these people to check out D
This reminds me of my experience of converting a simple
imperative-style Monte-Carlo simulation program from D to
Haskell, to learn and test the limits of the latter.
It took far more time than writing the D program.
Contrary to the stereotype, Haskell can 100% imperative
programming and raw mutable arrays. With the right library
abstractions, it's even good at that. But, to do that efficiently
you have to be experienced and understand a lot of abstractions
inside out.
This is because the language primitives are immutable and pure
mathematics-style entities, I/O and mutability is treated as a
special library abstraction. At least in principle, I feel it's
the correct way to go about things. Pure code is the recommended
default in pretty much any language after all, when there is no
specific reason to do otherwise.
But man does that steepen the learning curve for some tasks.
Ironically, you don't need to know monads nearly as well to excel
pipes-and-filters-style programming as you have to excel with
mutable arrays.
That's what Haskell is like: you have to jump through many hoops
to understand how you can get things done, but when you finally
do the solution is almost without fail extremely powerful and
to-the-book, and usually there is a solution no matter what
you're trying to achieve. By the way, that also what Nix package
manager is like, compared to the traditional alternatives.
To me the article reads like Rust is pretty similar. Whether
that's a good or a bad thing, comes mostly down to preference.
More information about the Digitalmars-d
mailing list