D and the world

janderson askme at me.com
Sat Apr 28 03:06:15 PDT 2007


Michael P wrote:
> Is there really any benefits using scripted languages besides not having to compile? D is much faster than most scripted languages and it compiles fast and have a garbage collector. I myself find D easier and you get better performance!
> "While the C++ parts of the engine are fast, UnrealScript is a relatively slow language to execute."
> It's a sad thing when ppl underestimate the advantages of good performance. Bump mapping could be done with an Amiga (demo but still). And if you install Win98 on a new machine it will fly! 
> 

You can't use D on a console as a scripting language, at least not as it 
is.  Most consoles don't support anything like DLL's so things must be 
linked in.  Something like Lua works fine as its interpreted at runtime.

I think there may be a narrow gateway here for D on windows/Linux 
systems as a scripting language.  That is a scripting language used in 
C/C++.

The main advantage of scripting is that you can push the task over to 
designers (this reduces communication bottlenecks and saves the more 
expensive engineers time).  It also provides a strong layer of 
abstraction that helps reduce errors.  Even if you simply use the 
scripting language as a binding from some sort of data-driven gui.  Also 
being able to make a change and see things change live, is a much faster 
turn-around time.

One nice thing about a scripting language like lua is its coroutines 
which help keep the logic together where it should be (making it much 
easier to follow/write).

On a negative note, I find that you can endup writing a load of binding 
code that would not be necessarily without scripting.  Also you may 
write a load of functions that call a script which simply calls back a 
C++ function, which essentially defeats the purpose.

Note: Some developers are using C# as a scripting language for C++.

-Joel



More information about the Digitalmars-d mailing list