Re: D styled data format, Json failed

2009-05-06 Thread Saaa
Thanks! With this I can go on for a bit :) "Christopher Wright" wrote in message news:gtrpo7$2h7...@digitalmars.com... > Saaa wrote: >> My first stab at the get function. >> As you might see, I need help :D >> Thanks! >> >> How do I make the function take a variadic argument and get its type? >

Re: D styled data format, Json failed

2009-05-06 Thread Christopher Wright
Saaa wrote: My first stab at the get function. As you might see, I need help :D Thanks! How do I make the function take a variadic argument and get its type? void get(in char[][] file, in char[] identifier, ...) { TypeInfo type = _arguments[0]; void* var = _argptr; // e

Re: D styled data format, Json failed

2009-05-05 Thread Saaa
My first stab at the get function. As you might see, I need help :D Thanks! How do I make the function take a variadic argument and get its type? //I guess the void pointer isn't the correct way, but I don't know any other way void get(in char[][] file, in char[] indentifier, void* var) { TypeI

Re: D styled data format, Json failed

2009-05-05 Thread Saaa
> > I guess you will have to write this one yourself, it will be to D what > JSON > is to javascript ;) :-) > > I wonder how much of an performance improvement you will get though when > loading data at runtime. As I couldn't even figure out how to save an multidimensional array in JSON we may n

Re: D styled data format, Json failed

2009-05-04 Thread Lutger
Saaa wrote: > > I looked at the JSON format and it seems very inefficient at loading arrays > as it isn't limited to one type per array. > This is nice when you want to save a small array with different typed > elements but for my purposes this is kind of a performance problem. > > This is wh

Re: D styled data format, Json failed

2009-05-04 Thread nobody
"Saaa" wrote in message news:gtlrs3$1b9...@digitalmars.com... > > I looked at the JSON format and it seems very inefficient at loading > arrays as it isn't limited to one type per array. > This is nice when you want to save a small array with different typed > elements but for my purposes this

D styled data format, Json failed

2009-05-03 Thread Saaa
I looked at the JSON format and it seems very inefficient at loading arrays as it isn't limited to one type per array. This is nice when you want to save a small array with different typed elements but for my purposes this is kind of a performance problem. This is why I will try and get suggest