[eeps] EEP 31

Robert Virding rvirding@REDACTED
Thu Dec 10 03:14:03 CET 2009


Almost missed this.

I have a few comments, in no specific order:

- I understand that giving list of binaries for a pattern means that they
are alternatives. I could not see where this was stated and I wonder if it
not a little confusing?

- Does 're' always return the first *shortest* match? I thought that it
returned the first matching alternative irrespective of length. Could be
wrong though. Always returning the shortest is very restrictive.

- Are first/1 and last/1 really necessary?

- This is the first time we have a copy function.

- It seems like 'binary' indexes binaries from 0. Is this wise? While
indexing them from 1 may not have been a good choice having two different
standards must surely be much worse and be a source of future confusion. I
know that 're' does this but I think that was a bad mistake!

- I would probably add to_list/1 and from_list/1 for completeness even
though they are the same as the bifs. Perhaps a future path would be to
phase out the 'erlang' bifs and move them into 'binary'?

- I am really serious about numbering from 0.

- The function name part seems strange, perhaps just because it is new. How
about using sub? I liked the names used in 'regexp', taken from the ancient
masters. :-)

That's about all for now. I'll be back,

Robert

2009/11/26 Patrik Nyblom <pan@REDACTED>

> A new EEP is submitted.
>
> EEP 31 is a slight rework of a part of EEP 9.
>
> Comments on this EEP are accepted until 10-Dec-2009. Please send all
> comments and suggestions to this mailing list (eeps@REDACTED).
>
> Best regards,
>
> /The OTP team/Patrik
>
> ________________________________________________________________
> eeps mailing list. See http://www.erlang.org/faq.html
> eeps (at) erlang.org
>
>


More information about the eeps mailing list