[erlang-questions] Bug ?!

Richard A. O'Keefe ok@REDACTED
Thu Oct 5 02:30:19 CEST 2006


Richard O'Keefe	| Richard Carlsson | Pattern
proposed        | counter-proposed | meaning
----------------+------------------+--------
 [*]            | [..]             | a list   of any size, including 0 or 1.
 {*}            | {..}             | a tuple  of any size, including 0 or 1.
 <<*>>          | <<..>>           | a binary of any size, including 0 or 1.
 #r{*}          |                  | any instance of record type r
                | #r{}             | existing syntax for the same thing

I was about to make an argument about #r{*} versus #r{}, but on reflection
lists, tuples, and binaries are sequences, and records aren't.  So maybe
it is a good thing for them to look different.

The first column gets by with no new tokens.
The second column requires a new "short ellipsis" token.
Darn it, the second column does look better.

It's just that I have painful memories of ",.." in DEC-10 Prolog.



More information about the erlang-questions mailing list