Yeah, an angelscript engine is probably just a horrible and slower form of a Java engine without any of the positives. That's why I'm never going to be in favor of moving c++ code to AS. In fact, I want to do the opposite: Move common usage patterns to c++! We just couldn't without adding tons of new code to the ZScript compiler.
Take the most common script ever as an example:
Code:
for(int i = 1; i <= Screen->NumEWeapons(); i++)
{
eweapon w = Screen->LoadEWeapon(i);
if(Abs(w->X-8)<someX && Abs(w->Y-8)<someY) // probably more stuff too
{
//collision or whatever
}
}
Which is horribly inefficient. Basically scripts are doing low-level stuff and I can tell you while I am able to optimize scripts to a degree most users can not.
The fact that most scripts use "ZScript engines" (ghost.zh, etc.) kind of compounds the issue.
Here's another example:
Code:
void foo(int, a, b, c, d, e, f, g){ // a is false
if(a && b && c && d && e && f && g && bar(a,b,c))
{
/....
}
}
Even though 'a' is false every other statement is evaluated and bar(...) is also called.