Hello,
it sometimes happens that I need functions on abstract data types in the
standard library which are not available there, but could be considered as
"usual" operations on such data. Also some other very commonly useful
functions could be added.
I was just wondering which way would be best to propose additions to the
standard libraries - I have modified a few standard modules, which now
contain additional functionality that might be useful for others, too. Is
it a good idea to send patches against the standard library in the hope
that they might be integrated?
Some specific examples include, e.g.:
* Char: functions like is_upper, is_lower, is_alpha, is_...
* Set: functions like for_all, exists, filter (find_all), partition.
These functions are in "List", too, but actually fit perfectly
to sets.
* Stack: with function top
Currently, the only way to use "Stack" in such a way is to
pop an element and push it again...
* String: the functions explode and implode for conversions of char
lists to strings and vice versa.
Especially useful for teaching, because it allows students to
use a functional style of programming when implementing string
algorithms.
There are some other additions, too, which I haven't yet fully integrated
into standard library modules.
Other people surely also have proposals for further additions to the
libraries. I can imagine that the OCaml-development team does not have the
time to deal with all such suggestions.
What do you think about the idea to make use of the "usercontrib"
CVS-repository at INRIA for such purposes? We could open a "stable" and
"development" branch for standard libraries (and "otherlibs") there, where
people could place and "peer review" their contributions. From time to
time, the OCaml-team can peek at the additions and take what they consider
useful.
This approach might be appealing to both sides:
* the OCaml-team can decide when to integrate what and won't get a bad
conscience by having to "bin" user suggestions. Additionally, some
"boring" development work can be delegated to the user community (I
know that developing compilers is more interesting than writing
standard libraries... ;-)
* the user community finally has a means to express their wishes in a
more direct way - which might increase the probability that suggestions
really get considered.
What do the developers and other users think of this idea?
Best regards,
Markus Mottl
--
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl