Xin Wang
2016-06-04 03:21:33 UTC
Three questions about rationals behind designing of module facility in M2R10:
1. In M2R10, we can append `+` to indicate that module is re-exported. If I'm reading correctly, after import an aggregation module, like `FooBarBaz`, we can use `Foo.quux` directly. There is a problem that names of `Foo` and `FooBarBaz` may be not related directly, it will be surprising that `Foo` is usable without being imported before. Why not support `FooBarBaz.Foo.quux`?
2. In description of "Constant Definitions", M2R10 report stated explicitly that "a constant may not be defined as an alias of a module...", it will forbid the possibility to define module alias, why this restriction is needed?
3. When reading through report, I do not sure whether M2R10 support nested module or not, something like `foo.bar.baz` in Python. It is partially related to question 1.
Thanks,
Xin Wang
1. In M2R10, we can append `+` to indicate that module is re-exported. If I'm reading correctly, after import an aggregation module, like `FooBarBaz`, we can use `Foo.quux` directly. There is a problem that names of `Foo` and `FooBarBaz` may be not related directly, it will be surprising that `Foo` is usable without being imported before. Why not support `FooBarBaz.Foo.quux`?
2. In description of "Constant Definitions", M2R10 report stated explicitly that "a constant may not be defined as an alias of a module...", it will forbid the possibility to define module alias, why this restriction is needed?
3. When reading through report, I do not sure whether M2R10 support nested module or not, something like `foo.bar.baz` in Python. It is partially related to question 1.
Thanks,
Xin Wang