Module and package with the same name
Francois Retief
fgretief at ieee.org
Mon Mar 20 13:30:02 PST 2006
Hello,
I have a quick question about modules and packages? Why can a module not
have the same name as a packages in D?
I have the following directory/file structure in mind:
kernel/hal.d
kernel/hal/cpu.d
kernel/hal/cpu/arm.d
kernel/hal/cpu/arm/arm7tdmi.d
kernel/hal/cpu/arm/boards.d
kernel/hal/cpu/arm/boards/netarm.d
kernel/hal/cpu/sh4.d
kernel/hal/cpu/sh4/sh7750.d
kernel/hal/cpu/sh4/boards.d
kernel/hal/cpu/sh4/boards/dreamcast.d
etc ...
As I see it, packages are the directories, while modules are the files. But
when I try it, (DMD v0.149) I get:
# hal.d: module hal and package hal have the same name.
Is this expected behaviour? If so, why this limitation?
Cheers
Francois
--
Francois Retief
fgretief at ieee dot org
More information about the Digitalmars-d
mailing list