Re: Serialization for D. Comments, please!

2009-06-18 Thread grauzone
BCS wrote: The demarshaller function is indexed via a string derived from the original object. What would the marshaller function key on? The best I can think of right now is the typeinfo and as of now, that's broken under DLLs DLLs are broken in general. There are many more problems

Re: Serialization for D. Comments, please!

2009-06-18 Thread BCS
Reply to grauzone, BCS wrote: The demarshaller function is indexed via a string derived from the original object. What would the marshaller function key on? The best I can think of right now is the typeinfo and as of now, that's broken under DLLs DLLs are broken in general. There are many

Re: Serialization for D. Comments, please!

2009-06-18 Thread grauzone
BCS wrote: Reply to grauzone, BCS wrote: The demarshaller function is indexed via a string derived from the original object. What would the marshaller function key on? The best I can think of right now is the typeinfo and as of now, that's broken under DLLs DLLs are broken in general.

Re: Serialization for D. Comments, please!

2009-06-18 Thread BCS
Reply to grauzone, Can you get the mangled name of an object instance at runtime via typeinfo? Not that I know of. IMHO, ClassInfo.name() is good enough. But if you don't like it, just keep using mangleof. You obviously have compile time access to the serializeable type, e.g.:

Re: Serialization for D. Comments, please!

2009-06-16 Thread grauzone
BCS wrote: Well, I can switch the default but, in my experience, most of the time repetition doesn't matter. I also dissagree on the relatively useless Oh really? I haven't used a graph data structure in some time. Most of them have been trees. And the cases I can think of, the repeated

Re: Serialization for D. Comments, please!

2009-06-16 Thread BCS
Hello grauzone, BCS wrote: Well, I can switch the default but, in my experience, most of the time repetition doesn't matter. I also dissagree on the relatively useless Oh really? I haven't used a graph data structure in some time. Most of them have been trees. And the cases I can think

Re: Serialization for D. Comments, please!

2009-06-16 Thread grauzone
Huh? You can simple cast the interface to an object. That is not safe. not all interface instances are D objects. There are people who care for COM and C++ interfaces? COM is Windows specific, and C++ vtables are... uh, I don't know, platform/architecture/compiler vendor specific? In any

Re: Serialization for D. Comments, please!

2009-06-16 Thread BCS
Hello grauzone, Huh? You can simple cast the interface to an object. That is not safe. not all interface instances are D objects. There are people who care for COM and C++ interfaces? COM is Windows specific, and C++ vtables are... uh, I don't know, platform/architecture/compiler vendor

Re: Serialization for D. Comments, please!

2009-06-14 Thread grauzone
BCS wrote: That's why I'd still require types to be marked as serializeable by the programmer. How would you do that aside from mixins? Make the user implement a marker interface, or let him provide a (single) special class member which fulfill the same function, or introduce annotations

Re: Serialization for D. Comments, please!

2009-06-14 Thread BCS
Hello grauzone, BCS wrote: That's why I'd still require types to be marked as serializeable by the programmer. How would you do that aside from mixins? Make the user implement a marker interface, that would work (for classes) but IMHO the side effects of that are more invasive and it

Re: Serialization for D. Comments, please!

2009-06-14 Thread grauzone
BCS wrote: introduce annotations into the language. NO, not an option. What, why? Sure, this is not a realistic option. Well, I can switch the default but, in my experience, most of the time repetition doesn't matter. I also dissagree on the relatively useless Oh really? optimization

Re: Serialization for D. Comments, please!

2009-06-14 Thread BCS
Hello grauzone, BCS wrote: introduce annotations into the language. NO, not an option. What, why? Sure, this is not a realistic option. D1 is fixed, and D2 will be in the next few months. I'm not going to even think of targeting D3 at this point. I'm writing this to be used, not as a

Re: Serialization for D. Comments, please!

2009-06-13 Thread grauzone
tupleof _can_ access private members, even if the type is from a different module than the function that uses the tupleof. This changed somewhere between dmd 1.030 and 1.040, I think. If it can, I would consider that a bug. It would be nice to get an official statement. And even if Walter

Serialization for D. Comments, please!

2009-06-11 Thread BCS
the latest and greatest: http://arrayboundserror.blogspot.com/2009/06/serialization-for-d-part-6-of-n.html This time I'm hoping for some feedback on how people want to interface with 3rd party types.

Re: Serialization for D. Comments, please!

2009-06-11 Thread grauzone
BCS wrote: the latest and greatest: http://arrayboundserror.blogspot.com/2009/06/serialization-for-d-part-6-of-n.html This time I'm hoping for some feedback on how people want to interface with 3rd party types. Is there any real reason for all those mixins?

Re: Serialization for D. Comments, please!

2009-06-11 Thread grauzone
Is there any real reason for all those mixins? which ones? All used by the user. That would be Serializable and SerializableRecuring.

Re: Serialization for D. Comments, please!

2009-06-11 Thread grauzone
BCS wrote: Reply to grauzone, Is there any real reason for all those mixins? which ones? All used by the user. That would be Serializable and SerializableRecuring. What else would you use? I guess if I really wanted to I could use the same device as for 3rd party types, but that just

Re: Serialization for D. Comments, please!

2009-06-11 Thread BCS
Reply to grauzone, BCS wrote: Reply to grauzone, Is there any real reason for all those mixins? which ones? All used by the user. That would be Serializable and SerializableRecuring. What else would you use? I guess if I really wanted to I could use the same device as for 3rd party

Re: Serialization for D. Comments, please!

2009-06-11 Thread Christopher Wright
grauzone wrote: Is there any real reason for all those mixins? which ones? All used by the user. That would be Serializable and SerializableRecuring. Also, what is curing in this context, and why would you need to do it multiple times?

Re: Serialization for D. Comments, please!

2009-06-11 Thread BCS
Hello Christopher, SerializableRecuring. Also, what is curing in this context, and why would you need to do it multiple times? My spelling sucks: s/Recuring/Recurring/

Re: Serialization for D. Comments, please!

2009-05-31 Thread BCS
And yet more progress. This time I've got hard-links working and I'm thinking about how to do 3rd party types. I don't have any useable ideas I really /like/, but I have one I'm sure I can make work. I do have one idea down at the bottom that I'd love to use but it would need some new

Re: Serialization for D. Comments, please!

2009-05-26 Thread Qian Xu
BCS wrote: I'm planning on taking a crack at a Serialization template library and I'm looking for feed back. My thinking so far is up on my blog here: http://arrayboundserror.blogspot.com/2009/05/serialization-for-d-part-1-of-n.html Please comment! (here or there, doesn't matter, I think

Re: Serialization for D. Comments, please!

2009-05-26 Thread Denis Koroskin
On Tue, 26 May 2009 13:29:39 +0400, Qian Xu quian...@stud.tu-ilmenau.de wrote: BCS wrote: I'm planning on taking a crack at a Serialization template library and I'm looking for feed back. My thinking so far is up on my blog here:

Re: Serialization for D. Comments, please!

2009-05-26 Thread aarti_pl
BCS pisze: I'm planning on taking a crack at a Serialization template library and I'm looking for feed back. My thinking so far is up on my blog here: http://arrayboundserror.blogspot.com/2009/05/serialization-for-d-part-1-of-n.html Please comment! (here or there, doesn't matter, I think

Re: Serialization for D. Comments, please!

2009-05-26 Thread Bill Baxter
On Tue, May 26, 2009 at 2:35 AM, Denis Koroskin 2kor...@gmail.com wrote: On Tue, 26 May 2009 13:29:39 +0400, Qian Xu quian...@stud.tu-ilmenau.de wrote: BCS wrote: I'm planning on taking a crack at a Serialization template library and I'm looking for feed back. My thinking so far is up on

Re: Serialization for D. Comments, please!

2009-05-26 Thread Denis Koroskin
On Tue, 26 May 2009 21:44:49 +0400, Bill Baxter wbax...@gmail.com wrote: On Tue, May 26, 2009 at 2:35 AM, Denis Koroskin 2kor...@gmail.com wrote: On Tue, 26 May 2009 13:29:39 +0400, Qian Xu quian...@stud.tu-ilmenau.de wrote: BCS wrote: I'm planning on taking a crack at a

Re: Serialization for D. Comments, please!

2009-05-26 Thread Bill Baxter
On Tue, May 26, 2009 at 12:19 PM, Denis Koroskin 2kor...@gmail.com wrote: On Tue, 26 May 2009 21:44:49 +0400, Bill Baxter wbax...@gmail.com wrote: On Tue, May 26, 2009 at 2:35 AM, Denis Koroskin 2kor...@gmail.com wrote: On Tue, 26 May 2009 13:29:39 +0400, Qian Xu quian...@stud.tu-ilmenau.de

Re: Serialization for D. Comments, please!

2009-05-26 Thread Denis Koroskin
On Wed, 27 May 2009 01:23:58 +0400, Bill Baxter wbax...@gmail.com wrote: On Tue, May 26, 2009 at 12:19 PM, Denis Koroskin 2kor...@gmail.com wrote: On Tue, 26 May 2009 21:44:49 +0400, Bill Baxter wbax...@gmail.com wrote: On Tue, May 26, 2009 at 2:35 AM, Denis Koroskin 2kor...@gmail.com

Re: Serialization for D. Comments, please!

2009-05-26 Thread Bill Baxter
On Tue, May 26, 2009 at 2:26 PM, Denis Koroskin 2kor...@gmail.com wrote: On Wed, 27 May 2009 01:23:58 +0400, Bill Baxter wbax...@gmail.com wrote: On Tue, May 26, 2009 at 12:19 PM, Denis Koroskin 2kor...@gmail.com wrote: On Tue, 26 May 2009 21:44:49 +0400, Bill Baxter wbax...@gmail.com

Re: Serialization for D. Comments, please!

2009-05-26 Thread BCS
Hello Bill, I'll also add that you should be able to properly serialize/deserialize a BaseClass pointer that actually points to a DerivedClass. This is pretty tricky to get working seamlessly when combined with the external serialization requirement. H3r3tic's xpose library has this working

Serialization for D. Comments, please!

2009-05-19 Thread BCS
I'm planning on taking a crack at a Serialization template library and I'm looking for feed back. My thinking so far is up on my blog here: http://arrayboundserror.blogspot.com/2009/05/serialization-for-d-part-1-of-n.html Please comment! (here or there, doesn't matter, I think I'll see both)