[Haskell-cafe] Re: Interest in helping w/ Haskell standard

Jon Fairbairn Jon.Fairbairn at cl.cam.ac.uk
Fri Oct 14 10:34:33 EDT 2005


On 2005-10-14 at 16:25+0200 Stephane Bortzmeyer wrote:
> On Fri, Oct 14, 2005 at 04:20:24PM +0200,
>  Wolfgang Jeltsch <wolfgang at jeltsch.net> wrote 
>  a message of 23 lines which said:
> 
> > By the way, it should be possible to handle regular expressions in
> > an Haskell-like way.
> 
> If you like so, but as one more possibility, not as the only way.
> 
> > I always couldn't understand why one has to write regular
> > expressions as strings
> 
> Because the language used inside these strings is standard,
> multi-language, widely used and documented?

10,000 lemmings can't be wrong?

Using strings for regexps is a disaster. Not even the syntax
of such regexps is checked at compile time. (This was part
of the point of my April 1st "joke" by the way).

The language would certainly benefit from the inclusion of
regexps the way Wolfgang suggested, but if we really need
the short-form syntax (I'm not convinced; it seems pretty
much a write only notation), then do it by having special
syntax as a shorthand for the proper Haskell.

Since Unicode is increasingly adopted, we could just use
«regexp» and specify some rules to convert the regexp into
Haskell, as "..." is meant to stand for '.':'.':'.':[].

 Jón

-- 
Jón Fairbairn                              Jon.Fairbairn at cl.cam.ac.uk




More information about the Haskell-Cafe mailing list