Closed o3o closed 9 years ago
Explain why it would be better. It does'nt change the user code.
import binrange;
Hi Guillaume It's not so important, just a convention.
First, from http://dlang.org/module.html:
Modules have a one-to-one correspondence with source files. The module name is, by default, the file name with the path and extension stripped off, and can be set explicitly with the module declaration.
and from http://ddili.org/ders/d.en/modules.html
By default, the name of a module is the same as its filename without the .d extension.
Then , our case module binrange;
=> file binrange.d
Second, package.d
is a conventional module name for importing all modules in a package.
from http://ddili.org/ders/d.en/modules.html
... It is achieved by a special configuration file in the package directory, which must always be named as package.d.
and from http://dlang.org/module.html#package-module
A package module can be used to publicly import other modules, while enabling a simpler import syntax..... The package module must have the file name package.d.
Thank for your attention.
Indeed it didn't make much sense, I've renamed it.
Use the v1.0.2+ tag
Hi Guillaume,
Why in your opinion package.
convention does not make sense?
It's very common:
which convention do you use ?
BAT
Of course it makes sense, I was talking about the previous naming. package.d is not only a convention, the compiler recognize it.
Ops...my English is really poor :)
Thank again, specially for your d-idioms... it's awesome
BAT
Thanks:) np
Hi, I 've seen that you've changed the your module name to
package.d
But package is standard name that provides a way to import a package. Maybe old name is better...what do you think?