Another option which might be interesting would be to target browsers directly with something like Scala.js.

EDIT: It has quite a big "runtime" (scala-library-as-js), but if you have game assets anyway they would probably dwarf that.

Why are you always suggesting some bizarre functional languages like Racket, Haskell and now... Scala? ...js?
Anyway, Rust is pretty interesting, but it's verbose, full of Ocaml-isms (I don't see any particular advantages in them) and poorly documented. It's probably a good replacement for Ada.
I also changed my opinion on D again It's more general purpose than Rust, the flaws have workarounds and, all in all, Angband should be rewritten in D

(Scala less so, but still a lot better than most things. Especially things that can target JS.)

Have you seen Elm? It's a very neat language, I think derived from Haskell, designed to be accessible for people who aren't into functional programming (which is me) but still has ADTs, and compiles into JS. I've not used it for anything yet but its design has heavily influenced a pure JS project I'm working on and made it a ton more manageable.

One of the major points of ADTs is to make illegal states undrepresentable -- and unions don't do that. In fact they possibly even make things worse because the programmer may easily get it wrong... leading to UB.

Quote:

These things still don't strike me as a super cool feature, though

Have you tried actually using them with pattern matching... and "making illegal states unrepresentable", etc? (I'm talking in e.g. O'Caml, Haskell or the like. Not in toy programs either -- real programs.)

(Interesting to see that D has an emulation of ADTs. I haven't tried D enough to know whether they're useful there, but having to use visitors to deconstruct (rather than true pattern matching) seems like it would basically cripple them.)

Have you seen Elm? It's a very neat language, I think derived from Haskell, designed to be accessible for people who aren't into functional programming (which is me) but still has ADTs, and compiles into JS. I've not used it for anything yet but its design has heavily influenced a pure JS project I'm working on and made it a ton more manageable.

Yes, but only tried it a little bit. It's too anemic for my taste, but it's lovely for what it is. (Especially if you can live with the rather low power ceiling.)

Have you tried actually using them with pattern matching... and "making illegal states unrepresentable", etc? (I'm talking in e.g. O'Caml, Haskell or the like. Not in toy programs either -- real programs.)

Hm, don't recall doing that. Most of my experience with functional programming is from tinkering with Common Lisp (hated that thing and it's not particularly functional anyway), and Erlang, which was pretty nice. I especially liked the huge amount of mutable state it had - that's probably because it was used to solve practical problems, not doing research or proving some theories
And, yeah, the C++ template language, which kind of scarred me for life