DIP16: Transparently substitute module with package
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Thu Apr 5 08:23:12 PDT 2012
On 4/5/12 7:43 AM, Steven Schveighoffer wrote:
> I currently think DIP16 is invalid/worksforme (public imports allows
> splitting a module into a package). All that is left is how we could
> specifically import a package with one import statement.
Not entirely (I was aware of the way public import works). An issue does
exist - there are "too many names", i.e. the alias pulled in the
importing module and also the name being imported. This makes for odd
synonyms such as std.algorithm_package.sort.sort being the same as
std.algorithm.sort. The other issue is that obviously algorithm_package
and algorithm must have distinct names, which makes the scheme a bit
awkward at least until we define a compelling convention. I guess we can
live with all that.
Andrei
More information about the Digitalmars-d
mailing list