Re: Are Lua tables possible to do with D?

2015-07-17 Thread rcorre via Digitalmars-d-learn
On Thursday, 16 July 2015 at 07:20:16 UTC, Fusxfaranto wrote: An associative array of Variant[string] ought to do the job well enough. http://dlang.org/phobos/std_variant.html For extra fun, you can implement the '.' style syntax pretty easily: --- import std.variant; struct LuaTable {

Are Lua tables possible to do with D?

2015-07-16 Thread Robert M. Münch via Digitalmars-d-learn
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

Re: Are Lua tables possible to do with D?

2015-07-16 Thread Fusxfaranto via Digitalmars-d-learn
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

Re: Are Lua tables possible to do with D?

2015-07-16 Thread Robert M. Münch via Digitalmars-d-learn
On 2015-07-16 07:20:15 +, Fusxfaranto said: An associative array of Variant[string] ought to do the job well enough. http://dlang.org/phobos/std_variant.html Thanks a lot. Somehow didn't see that... -- Robert M. Münch http://www.saphirion.com smarter | better | faster

Re: Are Lua tables possible to do with D?

2015-07-16 Thread Jesse Phillips via Digitalmars-d-learn
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