new standard libraries
Wed Nov 27 19:25:07 CET 2002
A few days ago, there was some talk about how nice it would be if the
standard libraries were cleaned up and put into packages. Also, the old
"Proposal 15. Built-in functions of Erlang" was pointed to.
The fact is that I've done a part of the restructuring already.
All the old "BIFs" that clutter the 'erlang' module have been given new
parallel names in the package system (largely following "proposal 15").
atom_to_list/1 -> erl.lang.atom:to_string/1
hd/1 -> erl.lang.list:hd/1
port_close/1 -> erl.lang.port:close/1
(Actually, since these are BIFs, and not implemented in Erlang code, you
can try them right now if you have an R9 system, but they are not
official yet: some names may change; maybe even some of the interfaces.
Note to the curious: look in "erts/emulator/beam/bif.tab".)
I have also written source code modules to correspond to these new BIFs.
Several of them contain no actual code (all functionality is implemented
in C), or add just one or two simple extra functions.
However, in a couple of cases I have taken the opportunity to create a
completely new set of functions; notably a new set of list functions,
and new functions for date and time. Not much has been properly tested.
If you want to experiment with this, and maybe contribute, go to:
and download the archive. (Also, read the README file.)
(Note that if you want to add code, there are a few files included that
spell out the guidelines for new code, which you may or may not agree
For now, contributions can be mailed directly to me. Maybe later this
could be on SourceForge or similar, but I assume that OTP wants to have
their say in what goes in the libraries.
Richard Carlsson () (This space intentionally left blank.)
E-mail: WWW: http://user.it.uu.se/~richardc/
More information about the erlang-questions