[erlang-questions] Poor interface of string:to_integer/to_float

9 views
Skip to first unread message

Robert Virding

unread,
May 7, 2012, 9:19:56 AM5/7/12
to Erlang Questions
The interfaces to the functions string:to_integer/1 and string:to_float/1 is, to put it mildly, very poor. You get the impressions that someone needed special case functions which were then put into the libraries. Would it be possible to change them to something more useful? Shall I write an EEP?

Robert
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Richard Carlsson

unread,
May 7, 2012, 9:59:02 AM5/7/12
to erlang-q...@erlang.org
On 05/07/2012 03:19 PM, Robert Virding wrote:
> The interfaces to the functions string:to_integer/1 and
> string:to_float/1 is, to put it mildly, very poor. You get the
> impressions that someone needed special case functions which were
> then put into the libraries. Would it be possible to change them to
> something more useful? Shall I write an EEP?

Assuming that you intend to preserve backwards compatibility and just
make the functions more general, I don't see that an EEP is needed.

/Richard

Richard O'Keefe

unread,
May 7, 2012, 6:08:23 PM5/7/12
to Robert Virding, Erlang Questions

On 8/05/2012, at 1:19 AM, Robert Virding wrote:

> The interfaces to the functions string:to_integer/1 and string:to_float/1 is, to put it mildly, very poor. You get the impressions that someone needed special case functions which were then put into the libraries. Would it be possible to change them to something more useful? Shall I write an EEP?

Weren't we told that the EEP process wasn't appropriate/needed for small library changes?

For myself, I would like something that can read a number with underscore separators.
Even Java has finally seen _that_ light!

It may be hard to change the interface of existing functions,
but a description of the replacements you would like to see
would be interesting.
Reply all
Reply to author
Forward
0 new messages