Are Lua tables possible to do with D?

Fusxfaranto via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 16 00:20:15 PDT 2015


On Thursday, 16 July 2015 at 06:48:12 UTC, Robert M. Münch wrote:
> Hi, do you think it's possible to implemented something like 
> Lua Tables (a hashed heterogeneous associative array) in D?
>
> I know that Lua is dynamic and interpreted, hence it's a lot 
> simpler to do than with a compiled language but I'm wondering 
> if we could express such a generic data-structure in D.

An associative array of Variant[string] ought to do the job well 
enough.

http://dlang.org/phobos/std_variant.html


More information about the Digitalmars-d-learn mailing list