Best practice and module declarations
torhu
no at spam.invalid
Thu Jul 15 15:02:57 PDT 2010
On 15.07.2010 23:28, Rory McGuire wrote:
> On Thu, 15 Jul 2010 23:08:07 +0200, torhu<no at spam.invalid> wrote:
>
>> On 15.07.2010 21:59, Rory McGuire wrote:
>>> From what I remember in TDPL:
>>> Can be used to rename a module if you have it in a different directory
>>> structure than how you use it. E.g. implementation and "headers" in
>>> separate folders.
>>
>> If you use *.di files (headers), you would normally just keep the
>> directory structure, but put the whole thing in a different root
>> directory. Just having *.d and *.di files in the same directory works
>> too, as the compiler prefers the *.di files.
>
>
> Andrei's use case was if you had multiple teams of programmers with some
> allowed to work on
> interfaces and others only allowed to work on the implementations.
>
>>
>>> Can be used to rename module when a filename is not a valid D symbol.
>>
>> That would fool the D-specific build tools, and DMD itself too. In most
>> cases it's easier to just rename the file too. It can be made to work
>> using a *.di file if you really have to.
>
> Andrei's example had hyphens in the file name, sometimes policy comes
> first? yes no. Not that I
> can think of a reason for the policy off hand perhaps GTK naming
> convention.
Seem a bit far fetched those examples, but ok ;)
More information about the Digitalmars-d-learn
mailing list