[erlang-questions] some language changes
Mon May 21 12:24:25 CEST 2007
On 5/21/07, Anthony Shipman <> wrote:
> On Monday 21 May 2007 18:10, Joe Armstrong wrote:
> > Now the book is done I've been thinking about some language changes.
> > 3. Extended string syntax: idea - put an atom *before the string quote
> > to say what the string means and to *change* the syntax rules that
> > apply to the string content.
> > X = C "......"
> > C = a control atom
> > X = regexp " ... "
> > = html " .... "
> Isn't that just a function call C("...") to inject the string into some new
> type? Being able to define a new abstract type would be a big improvement in
> the language.
No - it changes the *syntax* of a string - normally you have to quote
Suppose I has a *simple* regexp like this:
[.?!]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*
I'd like to say
X = regexp "[.?!]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*"
and not the more obvious
X = "[.?!]\\"')}]*\\\\($\\\\| $\\\\|\t\\\\| \\\\)[ \\t\\n]*"
> Anthony Shipman Mamas don't let your babies
> grow up to be outsourced.
> erlang-questions mailing list
More information about the erlang-questions