[Haskell-cafe] some ideas for Haskell', from Python

Jonathan Cast jonathanccast at fastmail.fm
Wed Jan 14 19:05:57 EST 2009


On Wed, 2009-01-14 at 18:59 -0500, Brandon S. Allbery KF8NH wrote:
> On 2009 Jan 14, at 10:26, Neil Mitchell wrote:
> >>>>  As an example:
> >>>>      foo = u"abc\N{VULGAR FRACTION ONE HALF}"
> >>>
> >>> Hmm, looks nice, and sensible. But as soon as you've got \N{....}  
> >>> syntax I want:
> >>>
> >>> "foo\E{show i}bar"
> >>>
> >>> i.e. embed expressions in strings. I think this would be fantastic.
> >>
> >> why not simpy "foo\E{i}bar" ?
> >
> > What if i is a string? You'd get: foo"i"bar
> >
> > Having different behaviour for string vs everything else would be  
> > equally bad.
> 
> ...except that show already *has* different behavior for String vs.  
> everything else.

Technically, showList has different behavior for Char vs. everything
else.

And not necessarily for *everything* else.

And that's very well *not* what he meant.

jcc




More information about the Haskell-Cafe mailing list