[erlang-questions] Package Support/Use
Fri Nov 3 22:11:33 CET 2006
On 11/3/06, Dominic Williams <xpdoka@REDACTED> wrote:
> Hi Eric,
> Compared to some other language communities I have known,
> this one is actually rather weak on community
> standards. I'll just offer three examples:
> - naming (camel case vs. underscore)
> - returning tagged values vs. throwing
> - using OTP or not
I don't actually think there is that much ambiquity here. Underscore
is the accepted practice, tagged values are the accepted practice and
OTP is the accepted practice. Some may use the alternatives but that
doesn't mean that the community standards are weak.
> The standard libraries themselves are sadly lacking in
> homogeneity. There is no consistent naming system, no
> consistent ordering of arguments, various strategies for
> error handling...
This is, most unfortunately, true.
> Also, the more Erlang spreads into open source, web
> development and so on (and this prospect has been offered as
> an argument for needing a solution to name clashes...), the
> more likely it becomes that whatever standards we do have
> become diluted.
Only if we let them. We, as a community, have control of this.
> However, out of interest and to see whether there would be a
> consensus, what would those standards of right and wrong
> ways of naming packages be?
Thats a good question. We could just adopt the java approach and go
with the reversed domain name. I personally wouldn't like that
approach. We could also go with the way of the OID folks and have
people register their top level namespace. This is probably a better
approach but there are many others.
> >> The simplest way to resolve name clashes after they occur
> >> is to rename one of the modules. Better support for
> >> automated refactoring would make this easy, and I guess
> >> that covers 99% of the name clash situations.
> > This works well only if you control the entire code
> > base. If I pull module A from one open source project and
> > module B from another I don't want to change anything in
> > module A or B. Touching files in either invalidates all
> > the tests that may have been run and it gives me a local
> > version that I now have to maintain. Neither of these
> > things are acceptable.
> How about a parse transform?
This wouldn't work for the same reasons that implementing renaming in
the language is hard. Its very difficult to tell what is a 'name' and
> Dominic Williams
> erlang-questions mailing list
More information about the erlang-questions