Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #760 (closed enhancement: wontfix)

Opened 11 months ago

Last modified 10 months ago

tango.stdc.posix.dlfcn redundancy (Linux / Darwin version blocks)

Reported by: Anders Assigned to: sean
Priority: trivial Milestone: 0.99.5
Component: Tango Version: 0.99.3 Triller
Keywords: Cc:

Description

The module contains something like:

version(linux) {

const BLAH = ...; ...

} else version(darwin) {

/* exactly the same as the linux block */

}

I propose that the version blocks are dropped altogether.

Change History

11/19/07 18:27:10 changed by kris

  • owner changed from kris to sean.

12/21/07 09:12:50 changed by larsivi

  • milestone changed from 0.99.4 to 0.99.5.

12/21/07 12:39:59 changed by sean

  • status changed from new to closed.
  • resolution set to wontfix.

The version blocks are a means of documenting which OS a particular declaration applies to, and are used for all declarations where the spec. doesn't completely specify how the thing should be declared. My worry is that if the version blocks are removed from things because they are identical between linux and darwin, as support for other OSes is added we may forget to verify/update some of these. Right now, the presence of the version blocks prevents compilation until the appropriate stuff is defined, so this cannot happen. I know this means the files may end up being somewhat large and contain some duplicate information, but this is the easiest way I can think of to keep them understandable. Tracking down the relevant information for each OS is also sufficiently easy that I don't consider it too much of a problem to fill information in as needed. So while I do appreciate the annoyance that having duplicate declarations, I think it will be worth it in the long run. I'm going to reject this for now.