Proposal for custom time string formatting in std.datetime

Joshua Reusch yoschi at arkandos.de
Fri Dec 23 02:14:46 PST 2011


Am 22.12.2011 22:57, schrieb Jacob Carlborg:
> On 2011-12-22 19:32, Walter Bright wrote:
>> On 12/22/2011 9:22 AM, Jacob Carlborg wrote:
>>> On 2011-12-22 16:56, Michel Fortin wrote:
>>>> The benefit of referencing classes within module info: you can
>>>> instantiate them using Object.factory, if they have a default
>>>> constructor. We pay a heavy price compared to what we get with this
>>>> very
>>>> limited runtime reflection.
>>>
>>> It's a really nice feature to have when implementing serialization.
>>
>> Sure, but we need to be aware of class overhead, and not use classes
>> unless necessary. I.e. a class shouldn't be used to merely create a
>> namespace. Classes also should not be used if it is not intended to be a
>> polymorphic type.
>
> Exactly. But I'm referring to deserializing classes, I don't care what
> they're used for.
>

IMHO, the user should know the type of the object he wants to 
deserialize, so it can be done only with compile-time reflection.


More information about the Digitalmars-d mailing list