[erlang-questions] [eeps] EEP 9

Vlad Balin gaperton@REDACTED
Sat Mar 8 20:53:45 CET 2008


> I agree that the proposal below would make for more readable code
>  (although the difference between split(Buffer, "\n ") and
>  split(Buffer, [<<"\n">>,<<" ">>]) is not really all that big). A
>  potential problem is that it could lead to confusion and strange
>  errors if you intended to write <<"and">> but instead by mistake wrote
>  "and".
I agree that it may lead to confusion. However, consider the case when
you provide the list of one symbol separators to detect tokens...
IMHO, it's too ugly to represent them as list of binaries.

It would be good idea to ask others obout that.

>  Which other functions where you thinking about?

I mean every function receiving Type = binary() | [ binary() ] as an
argument. Just checked - there is a single other function -
binary:match.

Idea was to replace Type with
Element = binary() | integer
Value = [ Element ]
which actually has IOList srtucture.



More information about the erlang-questions mailing list