Re: deserialization: creating a class instance without calling constructor

2015-05-25 Thread timotheecour via Digitalmars-d-learn
On Thursday, 21 May 2015 at 19:06:35 UTC, Jacob Carlborg wrote: On 2015-05-21 11:06, Timothee Cour via Digitalmars-d-learn wrote: Can I create an instance of A without calling a constructor? (see below) Use case: for generic deserialiaztion, when the deserialization library encounters a class

deserialization: creating a class instance without calling constructor

2015-05-21 Thread Timothee Cour via Digitalmars-d-learn
Can I create an instance of A without calling a constructor? (see below) Use case: for generic deserialiaztion, when the deserialization library encounters a class without default constructor for example (it knows what the fields should be set to, but doesn't know how to construct the object).

Re: deserialization: creating a class instance without calling constructor

2015-05-21 Thread John Colvin via Digitalmars-d-learn
On Thursday, 21 May 2015 at 09:06:59 UTC, Timothee Cour wrote: Can I create an instance of A without calling a constructor? (see below) Use case: for generic deserialiaztion, when the deserialization library encounters a class without default constructor for example (it knows what the fields

Re: deserialization: creating a class instance without calling constructor

2015-05-21 Thread Baz via Digitalmars-d-learn
On Thursday, 21 May 2015 at 09:06:59 UTC, Timothee Cour wrote: Can I create an instance of A without calling a constructor? (see below) Use case: for generic deserialiaztion, when the deserialization library encounters a class without default constructor for example (it knows what the fields

Re: deserialization: creating a class instance without calling constructor

2015-05-21 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-05-21 11:06, Timothee Cour via Digitalmars-d-learn wrote: Can I create an instance of A without calling a constructor? (see below) Use case: for generic deserialiaztion, when the deserialization library encounters a class without default constructor for example (it knows what the fields