[erlang-questions] lists:reverse/1 as a built-in function
Wed Jan 24 11:11:28 CET 2007
Robert Virding wrote:
> We also had another idea which I really liked: split the predefined
> module 'erlang' into a number of predefined modules like process,
> atom, number, .... And some left in erlang. These modules would be
> like todays erlang in that they would be part of the language and
> specially treated. I hink the result would be easier to handle that
> the wopping great erlang of today. Alas some worried about
> backwards incompatibility if people had there own modules with the
> same names.
What about also adding in module aliases at the same time? If you had
-alias(mypkg, erlang). as a way of saying that mypkg:* is an alias
for erlang:* you might help or avoid a lot of migration issues.
Alternatively, you could have compiler switches instead.
There are two prior art data points to consider here. C++ namespaces,
although they lack access control, can be aliased:
which allows for shorthand names or for migration issues. The other
point is that Java uses by convention a company's domain name as the
package suffix. This is fine until your company gets bought (or a
project is open sourced or otherwise moved) when code that works now
needs to be changed because of package naming issues. An alias in
Java would help a lot.
Hubert Matthews http://www.oxyware.com/
More information about the erlang-questions