digitalmars.D - Duplicate floor() functions
- Bob W (11/11) Feb 18 2005 In reference to compiler message:
- Norbert Nemec (7/21) Feb 19 2005 Why not use an alias? The whole point of a good module system is, that
- Ben Hinkle (3/24) Feb 19 2005 That would work but looking at the floor() in std.date it looks to me li...
- Bob W (3/31) Feb 19 2005 I fully agree.
In reference to compiler message: "function std.math.floor conflicts with std.date.floor ..." The floor functions in std.math and std.date are colliding with each other, thus requiring the necessity to use "std.math.floor(x)" instead of "floor(x)" in certain cases. I'd call this a major nuicance, especially when porting certain C programs to D. How about renaming the "floor" function in std.date, since it is not even mentioned in the Phobos docs?
Feb 18 2005
Bob W schrieb:In reference to compiler message: "function std.math.floor conflicts with std.date.floor ..." The floor functions in std.math and std.date are colliding with each other, thus requiring the necessity to use "std.math.floor(x)" instead of "floor(x)" in certain cases. I'd call this a major nuicance, especially when porting certain C programs to D. How about renaming the "floor" function in std.date, since it is not even mentioned in the Phobos docs?Why not use an alias? The whole point of a good module system is, that it separates symbols into namespaces and allows solving conflicts in an easy way. (Even better would be, of course, if conflicting routines from different modules were automatically handled as overloads of each other. I think that issue was discussed before?)
Feb 19 2005
In article <cv74jf$24d3$1 digitaldaemon.com>, Norbert Nemec says...Bob W schrieb:That would work but looking at the floor() in std.date it looks to me like it should be private.In reference to compiler message: "function std.math.floor conflicts with std.date.floor ..." The floor functions in std.math and std.date are colliding with each other, thus requiring the necessity to use "std.math.floor(x)" instead of "floor(x)" in certain cases. I'd call this a major nuicance, especially when porting certain C programs to D. How about renaming the "floor" function in std.date, since it is not even mentioned in the Phobos docs?Why not use an alias? The whole point of a good module system is, that it separates symbols into namespaces and allows solving conflicts in an easy way. (Even better would be, of course, if conflicting routines from different modules were automatically handled as overloads of each other. I think that issue was discussed before?)
Feb 19 2005
"Ben Hinkle" <Ben_member pathlink.com> wrote in message news:cv7d9m$2eut$1 digitaldaemon.com...In article <cv74jf$24d3$1 digitaldaemon.com>, Norbert Nemec says...I fully agree.Bob W schrieb:That would work but looking at the floor() in std.date it looks to me like it should be private.In reference to compiler message: "function std.math.floor conflicts with std.date.floor ..." The floor functions in std.math and std.date are colliding with each other, thus requiring the necessity to use "std.math.floor(x)" instead of "floor(x)" in certain cases. I'd call this a major nuicance, especially when porting certain C programs to D. How about renaming the "floor" function in std.date, since it is not even mentioned in the Phobos docs?Why not use an alias? The whole point of a good module system is, that it separates symbols into namespaces and allows solving conflicts in an easy way. (Even better would be, of course, if conflicting routines from different modules were automatically handled as overloads of each other. I think that issue was discussed before?)
Feb 19 2005