What's missing from Phobos for Orbit (package manager)

Jonathan M Davis jmdavisProg at gmx.com
Fri Feb 15 01:14:39 PST 2013


On Friday, February 15, 2013 13:03:04 Dmitry Olshansky wrote:
> 15-Feb-2013 12:29, Jacob Carlborg пишет:
> > On 2013-02-15 07:29, Dmitry Olshansky wrote:
> >> It could then the only roadblock is dependency on Tango.
> >> The only problem I had with serialization is that it's like using huge
> >> module to do the "dump this struct in JSON" kind of thing that's doable
> >> in 20-30 lines.
> > 
> > It's not huge. I already had the serialization library available. Not
> > using it would be stupid.
> > Having 30k+ lines of code just to get the time _is_ huge.
> 
> With through unittests being about 50% of the said code...
> Plus it's not get the time (nobody stops you from calling gettimeofday
> of POSIX)
> and calendar/timezones stuff is ridiculously hard to get right,
> I for one wouldn't try to re-implement it.
> 
> That being said I like slim stuff with no baggage and yes, std.datetime
> is huge.

Tests are over half of it, and the documentation is probably around half of 
what's left after that, and those tests are critical. As simple as much of the 
code is, it's ridiculously easy to get stuff wrong when it comes to corner 
cases. And it's doing a _lot_ more than getting the time. So, for the most 
part, I think that it merits being as large as it is. It's the fact that it's 
all in one module that's the problem (and it was actually split in my original 
proposal, but I split it badly, and I was told to put it back together again. 
It also changed quite a lot over the course of the review).

I _would_ like to split it up though. But I'm not going to do it until some 
variant of DIP 15 or 16 is implemented so that it can be split up in place 
without breaking any code.

- Jonathan M Davis


More information about the Digitalmars-d mailing list