3 ms·
Scala for a game engine seems like an odd choice. What was the initial decision to choose it? Also, how’s the compile time? If it’s too long won’t it drive you
by didip 5y ago
Scala for a game engine seems like an odd choice. What was the initial decision to choose it?
Also, how’s the compile time? If it’s too long won’t it drive you crazy?
- lmm 5y agoSounds like it was for the compiler, not the engine itself. IMO Scala is the best general-purpose language going, but it's particularly good for data transformation, so it's a good fit for compilers.
- cyber_kinetist 5y agoMany years ago I was turned off at Scala for its weird ergonomics (relying heavily on implicits, also the syntax is too wild for my taste) and large build times, along with Project Valhalla still not being finished. Maybe things have gone better for Scala 3?
- lmm 5y agoScala 3 has put in some specific replacements for the main use cases of implicits, which IMO is a worse approach and a step backwards but I guess you might prefer that. The syntax has been pushed to be a bit more Python-like, but again I don't know if that'll be a plus or minus for you. But on the last point Scala has had "Opaque types" for 3+ years now, and IMO that's a better alternative to what Project Valhalla is trying to do for the cases that it covers.
- cyber_kinetist 5y agoCan you use opaque types to make “value-like” matrix/vector types like vec3, vec4, mat4, etc.? This was the biggest reason I eliminated the Java platform as an option for using it in gamedev. The alternative for Project Valhalla is to either live with the GC costs or use a hack from LWJGL (MemoryStack) which is very unergonomic to use.
- wtetzner 5y agoWas Scala used for the game engine? It sounded to me like it was just used to write the compiler for Vale.