On Wednesday, 19 December 2012 at 14:21:43 UTC, Joel Lamotte
wrote:
So I was thinking vaguely about future of game programming in
my own career, how I would have used D if there was more tool
and library support for my domain and other similar things and
it hit me that if D was a language available in some specific
game dev tools, it's popularity and availability would jump to
the roof.
I was wondering is either Andrei or Walter did try to contact
Unity3D guys see if it would have been possible for them to
have D as one of the possible scripting language?
I know D could be used from the paid version of Unity, like C++
can be called from Unity3D scripts. However D as a scripting
language for it would be very interesting at least on the
educational point.
What do you think?
Joel Lamotte
I doubt the Unity3D team will have much interest in adapting D to
their engine, unfortunately. It just isn't cost effective,
there's no real benefit over C# for what Unity makes use of
(besides possibly getting rid of the Mono dependency). I'm pretty
sure Unity also makes use of C#'s runtime reflection capabilities
to dynamically bind to script events and properties. D is mostly
just as capable as C# with runtime reflection (to my knowledge),
but you have to build out structures manually, and it's much more
difficult.
A better idea would be to make a new Game Engine completely
written in D, which also uses D for "scripts". You'd still need
to build runtime reflection structures for anything like Unity's
editor, though. I was playing around with D the other day with a
similar motive, but I never really came up with a solution on how
to dynamically bind a delegate to a "unknown" type's function.