On Thu, Mar 15, 2012 at 3:56 PM, F i L <span dir="ltr"><<a href="mailto:witte2008@gmail.com">witte2008@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Paulo Pinto wrote:<br>
The main benefit dynamic languages bring to the table is not requiring to<br>
write types everywhere, duck typing, and the flexibility metaprogramming<br>
has.<br>
</blockquote>
<br></div>
I'll give you the metaprogramming bit, but duck-typing is rarely a benefit over languages, like D and C#, which support "auto"/"var" keywords. I'd actually argue that getting early compile-time error when I accidentally change variable type (except in areas I explicitly want it) is actually a time saver of statically typed languages. Granted casting types is a bit lower-level concept and can be a pain to type.<div class="im">
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Andrei Alexandrescu wrote:<br>
Relevant insight: <a href="http://existentialtype.wordpress.com/2011/03/19/dynamic-languages-are-static-languages/" target="_blank">http://existentialtype.<u></u>wordpress.com/2011/03/19/<u></u>dynamic-languages-are-static-<u></u>languages/</a><br>

</blockquote>
<br></div>
Thanks for the link. I understand all code eventually becomes binary, of course, and I have a pretty good understanding of how V8 JS functions internally. I just can't see why someone would want to use an "expressively straightjacketed" (as the article puts it) language when they have the option not to.<br>

<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Adam D. Ruppe wrote:<br>
import std.variant;<br>
struct Extendable {<br>
    Variant[string] properties;<br>
    Variant opDispatch(string name)() {<br>
       return properties[name];<br>
    }<br>
    Variant opDispatch(string name, T)(T t) {<br>
       properties[name] = t;<br>
       return properties[name];<br>
    }<br>
}<br>
<br>
void main() {<br>
    auto a = Extendable();<br>
    a.sweet = 10;<br>
    a.cool = { a.sweet = a.sweet + 1; }<br></div>
    a.cool();<br>
}<br>
</blockquote>
<br>
Awesome! I knew it was possible, just didn't think it'd be that easy! You know, it might be nice to an std.dynamic or extend variant to include a general purpose Dynamic type. Just a thought.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
so Wrote:<br>
I'd love to use D but it is not an option is it? At least for the<br>
things i am after, say game scripting.<br>
</blockquote>
<br></div>
I think D's a great option. A D compiler would only have to be distributed with the  tool-chain/editor, and scripts could be statically compiled with the rest of engine. Safe-D is safe, and comparably easy to understand as other common scripting languages (Unity's uses C# for example) and advanced scripters would have the options of getting real low-level with their logic blocks. Plus, if the rest of the game engine was written in D, integrating the scripts would be completely seamless.<br>

<br>
<br>
~~~~~~~~~~<br>
<br>
<br>
On a completely irrelevant, but slightly related note: I have just released my first Unity 3D game for Android/iPhone, Space Pizza Delivery! (<a href="https://play.google.com/store/apps/details?id=com.ReignStudios.SpacePizzaDelivery" target="_blank">https://play.google.com/<u></u>store/apps/details?id=com.<u></u>ReignStudios.<u></u>SpacePizzaDelivery</a>)<br>

<br>
Woohoo! It's simple, but fun, and we have a much more ambitious project in the works. Hopefully the start of my game-maker career! :-D (and yes, I am shamelessly advertising ;p)<br>
</blockquote></div><br><div>Got a score of 292 while spending most of the time with just a sliver of life.  Those sneaky health powerups kept getting knocked off the screen before they'd reach me.  Fun though.</div><div>
<br></div><div>Regards,</div><div>Brad Anderson</div>