November 29, 2004More warts in Phobos
1. std.socket Several functions return ERROR on failure. Unless I'm missing something, then this is completely in violation of the Phobos and D philosophies: "Use Exceptions for Error Handling" 2. std.date "typedef d_time Is a signed arithmetic type giving the time elapsed since January 1, 1970. Negative values are for dates preceding 1970. The time unit used is Ticks. Ticks are milliseconds or smaller intervals." However, some of the functions in date.d take or return d_time for other things, such as time component values or date values, rather as if TicksPerSecond is variously equal to 1/86400, 1/3600, 1/60 or 1. There are perfectly good int and long types for these, so why is it going out of its way to use d_time for what it doesn't mean? Stewart.
Copyright © 1999-2016 by the D Language Foundation