Proposal for custom time string formatting in std.datetime

Jacob Carlborg doob at me.com
Fri Dec 23 07:56:47 PST 2011


On 2011-12-23 11:14, Joshua Reusch wrote:
> 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.

That might work, I haven't thought about it.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list