A Perspective on D from game industry

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 17 23:37:17 PDT 2014


On 6/17/2014 3:20 PM, c0de517e wrote:
> The issue I have with metaprogramming (and overloading and some other similar
> ideas) is that it makes a statement dependent on a lot of context, this is
> tricky in a large team as now just reading a change doesn't really tell much.
> Our is an industry where we still exercise a lot of control, we want to know
> exactly what a statement does in terms of how it's executed.

It's a fair criticism.

On the other hand, we've already given up on a great deal of knowing exactly 
what a statement does, even in C. How many of us program in assembly anymore? 
How many of us can even make sense of assembly code?

It is absolutely necessary to move to higher levels of abstraction in order to 
handle the increasing complexity of modern programs. Proper use of 
metaprogramming reduces complexity and reduces programming bugs. And yes, the 
price paid for that is you'll need to put more trust in the metaprogramming 
tools to "do the right thing" with your intention, just like modern programs now 
trust the compiler.


More information about the Digitalmars-d mailing list