Comment by achenet
2 days ago
possibly a stupid answer (and if so, someone please invoke Cunningham's law and correct me) but -
Isn't Rust ML/functional inspired? The original compiler was in Ocaml, if I'm not mistaken.
Isn't Rust at least somewhat close to being usable for game engines? https://arewegameyet.rs/
Rust is a good candidate, but it lacks some crucial aspects when it comes to what I would consider 'nice to haves' from a modern language in this territory.
While rust has traits, borrowing etc, it doesn't have a lot of things with regard to types and optimization. Things like:
- A lack of GADTs, or a stronger version, dependent types, or similar type system which would allow one to encode natural relationships, recursive ones, invariants etc.
- Tail call optimization guarantees, to allow for mutual recursion and optimization since game engines are just huge state machines, and it would allow to pass functions around which could call each other via mutual recursion, while allowing it to be optimized as well.
- Efficient structural sharing of immutable state, which would be memory layout and cache friendly
- Built in profiling from the getgo which the language developers would use and refine, so you could get information about how the program behaves over time and space.