Bang patterns

Doaitse Swierstra doaitse at swierstra.net
Fri Feb 8 14:23:43 CET 2013


I prefer them to be part of the context-free syntax, since this enables a future extension in which an arbitary expression can be placed between backticks. This would enable one to write things as:

 x `f i` y

and

expr1 `expr2` expr3 


is to be interpreted as (expr2) (expr1) (expr3),

 Doaitse




 


On Feb 8, 2013, at 13:27 , Simon Marlow <marlowsd at gmail.com>
 wrote:

> On 08/02/13 11:49, Ben Millwood wrote:
>> On Thu, Feb 07, 2013 at 12:24:48PM +0000, Simon Marlow wrote:
>>> FWIW, I really dislike whitespace-significant syntax.  f ! x should
>>> mean the same as f !x.  Look at the trouble we have with qualified
>>> operators: how many people have tried to write [Monday..] and been
>>> surprised that it doesn't work?
>> 
>> What about `elem`? I don't think anyone would argue that ` elem ` makes
>> sense.
> 
> Prelude> 1 ` elem ` [1..10]
> True
> Prelude> 1 ` {- comment -} elem ` [1..10]
> True
> 
> backticks are part of the context-free syntax, not the lexical syntax (as they should be!).  I'm of the opinion that the lexical syntax should be as simple, and as far as possible everything should be pushed into the context-free syntax.
> 
> Cheers,
> 	Simon
> 
> 
> _______________________________________________
> Haskell-prime mailing list
> Haskell-prime at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-prime




More information about the Haskell-prime mailing list