digitalmars.D.bugs - More warts in Phobos
- Stewart Gordon (15/15) Nov 29 2004 1. std.socket
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.
Nov 29 2004