On Saturday, 13 December 2014 at 15:58:29 UTC, Joakim wrote:
When should it be redundant, for every single Posix declaration in druntime? That's far from the case now. When the authors think a handful of declarations might vary on some future unspecified platform? Each of the linked examples are separated, yet none of them vary on any of the 4-5 supported Posix platforms. In fact, I just checked and none of them are used anywhere in druntime and phobos, with only IPPROTO_RAW used to define another unused enum in phobos.

My guess is that you put each of these inside a version(linux) block just to be safe when you first started druntime, and porters have since been blindly adding other OSs to the list, despite the separation serving no real purpose. I have no problem with having version(OS) blocks where there are actual differences between the OSs, just not these cases where all the OSs happen to be the same.

I'm suggesting cleaning up this needless redundancy, to make it easier for future porters.

Since I didn't get a response to this, I've submitted a work-in-progress pull with the suggested cleanups, along with others talked about in this thread:

https://github.com/D-Programming-Language/druntime/pull/1069

Any further discussion can take place on the PR thread.

Reply via email to