Proposal for custom time string formatting in std.datetime

Walter Bright newshound2 at digitalmars.com
Fri Dec 23 17:29:54 PST 2011


On 12/23/2011 7:19 AM, Jacob Carlborg wrote:
> On 2011-12-23 03:21, Walter Bright wrote:
>> On 12/22/2011 11:25 AM, Piotr Szturmaj wrote:
>>> I wish D could support partial modules - partial as analogy to C#'s
>>> partial
>>> classes.
>>>
>>> module std.datetime-unit1;
>>> import std.datetime-unit2;
>>> // dash allowed only in submodules with the same module name
>>> ...
>>>
>>> module std.datetime-unit2;
>>> import std.datetime-unit1;
>>> ...
>>>
>>> // then
>>>
>>> module whatever;
>>> import std.datetime; // as usual
>>
>>
>> I have no idea why anyone would want this. (Is it because the file is
>> too big to fit on a floppy disk? <g>)
>>
>
> std.datetime is kind of hard on IDE's and text editors. I know TextMate has
> problems with it and Descent has problems with a lot less code.

I'm not going to defend programs that can't handle large text files, but in D 
one could always:

module std.datetime;

mixin(import("datetime-unit1.d"));
mixin(import("datetime-unit2.d"));


More information about the Digitalmars-d mailing list