quoting
Joe Armstrong (AL/EAB)
joe.armstrong@REDACTED
Tue Nov 29 15:56:03 CET 2005
Comments:
1) printing binaries <<"...">> properly has had a strange effect on my programming
I now use them far more than I ever did before - this is because they get printed
nicely - I think I was often using atoms just because I could see them when my
program failed.
2) We don't need or want a string type. That's what a binary is.
IMHO we need a character type - so we can distinguish $a from 97.
We also need a small number of BIFs that do string operations on binaries.
for example split(Binary, Str) -> {Before, After} | no
(take a binary and split it at a constant string) would be *incredable* useful
A small number of well-chosen primitive on binaries would be very useful.
Somebody else can tell the list what these should be - and how yecc and leex can make use of
them :-)
/Joe
> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Vlad Dumitrescu
> XX (LN/EAB)
> Sent: den 29 november 2005 11:47
> To: erlang-questions@REDACTED
> Subject: RE: quoting
>
>
> Hi,
>
> > Change 1 - to io_lib.erl print binaries containing strings
> > as <<"abc">> as <<"abc">> and NOT
> > <<97,98,99>>
>
> I think this is nice, but... It is already a little tricky to get the
> proper formatting when handling lists of integers vs strings. Now it
> will be the same with binaries.
>
> I'd like to suggest (like so many before me) that a proper string type
> is introduced. I realize this is more difficult than it looks
> (especially wrt old code), but I think that it would be one of those
> added feature that doesn't require removing something else in order to
> preserve simplicity.
>
> Regards,
> Vlad
>
More information about the erlang-questions
mailing list