--
You received this message because you are subscribed to the Google Groups "Reia" group.
To post to this group, send email to re...@googlegroups.com.
To unsubscribe from this group, send email to reia+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/reia?hl=en.
Tony - would you want to save $ for regex group matches ala ruby/perl?
Can I make a wacky suggestion: what if you were to use double quotesfor binaries, and something else for lists of characters?
Counter-arguments:
* lots of Erlang standard libraries expect lists of characters
Aside: I'm not sure that these are mutually exclusive. << and >> are
infix operators; when would they be confused with the syntax around
binaries?
And an iolist is a list of (characters and/or binaries and/or
iolists), correct?
I see. In that case, a string literal like "abc" might be internalised
as {string, [<<"abc">>], 3}
That's nice. It's easy to turn interpolated strings into this form
too.
> The binary syntax is more complex than mere strings, and I want to support
> the full capabilities of binary pattern matching present in Erlang
Understood - you need another 'grouping' construct for dealing
natively with binaries.
I can't think of anything better than $[...]. It looks list-like, and
$ was used in BASIC for strings :-)
For simple literals, perhaps you could allow
mybin = $["abc"]
to be shortened to
mybin = $"abc"
You could then use either $[] or $"" for an empty binary.
And an iolist is a list of (characters and/or binaries and/oriolists), correct?
I see. In that case, a string literal like "abc" might be internalised
as {string, [<<"abc">>], 3}
That's nice. It's easy to turn interpolated strings into this form
too.
For simple literals, perhaps you could allow
mybin = $["abc"]
to be shortened to
mybin = $"abc"
--
You received this message because you are subscribed to the Google Groups "Reia" group.
To post to this group, send email to re...@googlegroups.com.
To unsubscribe from this group, send email to reia+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/reia?hl=en.