Henrik Nilsson | 1 Apr 22:12 2008
Picon

Re: patch applied (haskell-prime-status): proposal: remove string gaps

 > Mon Mar 31 15:26:03 PDT 2008  Simon Marlow <simonmarhaskell@...>
 >  * proposal: remove string gaps

Hm. This has escaped me.

I don't find the rationale as documented on the Wikipage

http://hackage.haskell.org/trac/haskell-prime/wiki/RemoveStringGaps

very convincing at all. I've thus added a few more cons:

     * string gaps are sometimes really helpful for
       formatting/pretty printing code
       neatly; the ++ alternative often necessecitates additional
       bracketing

     * the simplification of the lexical syntax is very minor

     * arguably, the syntax highlighting ought to be fixed as that's what
       at fault, not the language as such

I have to confess I find string gaps rather elegant, and I think any
sensible language ought to have them!

/Henrik

--

-- 
Henrik Nilsson
School of Computer Science
The University of Nottingham
(Continue reading)

Neil Mitchell | 1 Apr 22:47 2008
Picon

Re: patch applied (haskell-prime-status): proposal: remove string gaps

Hi Henrik,

In reality, string gaps are unusable in practice, because of GHC and
-cpp. We had some in Yhc at one point, and then breakage happened, so
we removed them.

To quote from the page:

    * string gaps cause problems with CPP, which doesn't like the
backslash at the end of the line. (a minor consideration, since CPP is
not part of the language, and in any case there is cpphs).

CPP might not be part of the language, but it is used extensively in
many projects - as such it does matter that you don't get obscure
errors in one part of a file by using CPP in an entirely different
part. The cpphs argument is perfectly sensible, if the GHC -cpp
invoked cpphs, but it doesn't, and doesn't seem to be likely to.

If you have two features battling each other, you probably need to
remove one of them. CPP isn't going to be removed, which kind of
forces the issue...

Thanks

Neil
Henrik Nilsson | 1 Apr 23:35 2008
Picon

Re: patch applied (haskell-prime-status): proposal: remove string gaps

Hi Neil,

 > If you have two features battling each other, you probably need to
 > remove one of them. CPP isn't going to be removed, which kind of
 > forces the issue...

Well, for the record, I've used both CPP and string gaps
extensively. And all I've done is to be careful to run CPP
only where needed (and avoid string gaps there), which seems
rather sensible to me anyway, string gaps or not.

If various build-systems make selective CPP-ing hard, then
I'd definitely argue that the build systems ought to be fixed (I
can't believe that would be terribly hard: I've at least done
it successfully using make. Not much fun, admittedly, but entirely 
feasible. Should be much simpler in the context of a more principled,
Haskell-oriented build system.)

 > If you have two features battling each other, you probably need to
 > remove one of them. CPP isn't going to be removed, which kind of
 > forces the issue...

Well, first of all, I don't think CPP is a feature of Haskell.
I do see your point from a pragmatic perspective, but I would
argue that auxiliary tool issues (be it CPP, syntax highlighting, or
what have you) should be of secondary concern when it comes to language
design.

As to CPP and Haskell in general, as a matter of principle, I think it's
a bad idea to run a preprocessor intended for one very different
(Continue reading)

Simon Marlow | 1 Apr 23:46 2008
Picon

patch applied (haskell-prime-status): add RecordPatternMatching and Disambiguate Record Fields

Tue Apr  1 14:46:12 PDT 2008  Simon Marlow <simonmarhaskell@...>
  * add RecordPatternMatching and Disambiguate Record Fields

    M ./status.hs +4
Simon Marlow | 2 Apr 00:28 2008
Picon

Re: patch applied (haskell-prime-status): proposal: remove string gaps

Henrik Nilsson wrote:
>  > Mon Mar 31 15:26:03 PDT 2008  Simon Marlow <simonmarhaskell@...>
>  >  * proposal: remove string gaps
> 
> Hm. This has escaped me.

Not surprising - it wasn't discussed anywhere else, I just thought I 
should bring it up as a possibility to consider.

> I don't find the rationale as documented on the Wikipage
> 
> http://hackage.haskell.org/trac/haskell-prime/wiki/RemoveStringGaps
> 
> very convincing at all. I've thus added a few more cons:
> 
>     * string gaps are sometimes really helpful for
>       formatting/pretty printing code
>       neatly; the ++ alternative often necessecitates additional
>       bracketing

I can't say I've ever run into that, but I can see how it might be an issue.

>     * the simplification of the lexical syntax is very minor
> 
>     * arguably, the syntax highlighting ought to be fixed as that's what
>       at fault, not the language as such

The point was that if we can make simplifications that make the life of 
tool writers easier, then all other things being equal we should do so.

(Continue reading)

Henrik Nilsson | 2 Apr 00:31 2008
Picon

Re: patch applied (haskell-prime-status): proposal: remove string gaps

 > I wonder if I should suggest removing all those strange ascii esacpe
 > sequences next...

Well, in contrast to string gaps, I don't think I've ever used those!

/Henrik

--

-- 
Henrik Nilsson
School of Computer Science
The University of Nottingham
nhn@...

This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
John Meacham | 2 Apr 00:38 2008
Picon

Re: patch applied (haskell-prime-status): proposal: remove string gaps

I concur! i use them in quite a few places. If anything, I would like
some more powerful style of quoting, like triple quotes in python.

        John

--

-- 
John Meacham - ⑆repetae.net⑆john⑈
John Meacham | 2 Apr 00:42 2008
Picon

Re: patch applied (haskell-prime-status): proposal: remove string gaps

On Tue, Apr 01, 2008 at 09:47:30PM +0100, Neil Mitchell wrote:
>     * string gaps cause problems with CPP, which doesn't like the
> backslash at the end of the line. (a minor consideration, since CPP is
> not part of the language, and in any case there is cpphs).

Between the two, I'd say CPP is the much uglier beast. (I tend to use m4
actually when I must use a preprocessor in general, it meshes with haskell better
and is pretty ubiquitous). In any case, the simple solution of
not using CPP in the same file as string gaps works quite well. It has
never really been an issue before.

        John

--

-- 
John Meacham - ⑆repetae.net⑆john⑈
Neil Mitchell | 2 Apr 00:57 2008
Picon

Re: patch applied (haskell-prime-status): proposal: remove string gaps

Hi

>   > If you have two features battling each other, you probably need to
>   > remove one of them. CPP isn't going to be removed, which kind of
>   > forces the issue...
>
>  Well, for the record, I've used both CPP and string gaps
>  extensively. And all I've done is to be careful to run CPP
>  only where needed (and avoid string gaps there), which seems
>  rather sensible to me anyway, string gaps or not.

Having two "features" which can't be used together in the same file
seems ridiculous. It gets much worse if you decide "ghc --make -cpp"
is the way you want to build your application, as we used to do for
Yhc. I suggest that if string gaps don't get removed, then GHC should
fix its -cpp flag.

Thanks

Neil
Manuel M T Chakravarty | 2 Apr 02:03 2008
Picon
Picon

Re: patch applied (haskell-prime-status): proposal: remove string gaps

John Meacham:
> On Tue, Apr 01, 2008 at 09:47:30PM +0100, Neil Mitchell wrote:
>>    * string gaps cause problems with CPP, which doesn't like the
>> backslash at the end of the line. (a minor consideration, since CPP  
>> is
>> not part of the language, and in any case there is cpphs).
>
> Between the two, I'd say CPP is the much uglier beast. (I tend to  
> use m4
> actually when I must use a preprocessor in general, it meshes with  
> haskell better
> and is pretty ubiquitous). In any case, the simple solution of
> not using CPP in the same file as string gaps works quite well. It has
> never really been an issue before.

Repeat after me: CPP is evil!

Plus I like strings gaps and have used them a lot.

Manuel

Gmane