I'll just leave this here: Rust
Nice language. A bit buggy though, and incomplete (impossible to make a doubly-linked-list without unsafe code), but that's to be expected as it is still under development.
Also, it's AOT compiled, and can run on most common platforms, but the standard libraries only work on Win/Mac/Linux.
Once this is complete I would consider using it as well as, or instead of Java.
I mentioned Rust. The language design looks extremely similar to Scala. Almost every Scala pro I mentioned applies identically to Rust.
- Similar variable and function declaration syntax. Optional types on the right after a colon. Defaults to type inference
- Avoids null. Both Scala and Rust use identically named "Option"
- Rust has an identical pattern matching mechanism to Scala.
- code blocks return values. if expressions make the ternary operator unnecessary.
- void type is called Unit.
- Both have native tuples.
The big difference is Rust is designed to work in a native, C-centric world, while Scala is designed to work in the JVM managed code world.
For some apps, such as a Firefox type web browser, the JVM is not an option. I imagine that is what the Rust team at Mozilla have in mind. That needs to work at a lower level. For a video game targeting Mac/Win/Linux, JVM seems ideal. The downside of JVM for games, is there is that the entire community is C based and JVM has terrible runtime options for consoles and iOS and even with Android, Dalvik is a high performance runtime like desktop Java.
I think the integration with the C world is much more important than AOT compilation. There are AOT compillation options with Java, they aren't polished, but even if they were, I think that's less important that C world integration.
Other Rust v Scala differences:
- Rust has more direct control over low level memory issues, which I imagine has both pros and cons depending on the scenario. Rust has more support for stack allocation, exposes pointers, optional, more manual garbage collection.
- Rust arrays use a disjoint syntax from other generics classes. IMO, this is a mistake.
- I've never used Rust but it's clearly a rare more obscure language, so it will not have the fleshed out community and tools and library ecosystem that Scala has.