[Haskell] Extensible records: Static duck typing

John Meacham john at repetae.net
Fri Feb 8 20:32:22 EST 2008

On Fri, Feb 08, 2008 at 04:43:43PM -0800, Dan Weston wrote:
> Ouch. How would a human parse [apple'*'pear]
> If this doesn't immediately scan as [ (*') (apple') (pear) ] to you (it 
> doesn't to me) then maybe allowing ' in infix operators may not be the best 
> thing.

Oh, I was thinking they would only be allowed at the end of infix
expressions, I'd even restrict them to the end of regular identifiers
too actually if it didn't break backwards compatability. that would make
everything unambiguous to parse. Id's like "Id's" are cute, but I do a
double take every time I try to parse one with my brain :). 


> John Meacham wrote:
>> On Tue, Feb 05, 2008 at 08:01:07AM -0500, Cale Gibbard wrote:
>>> I also like this idea. Retaining the ability to treat selection as a
>>> function easily is quite important, and this meets that criterion
>>> nicely. Also, in which case does this cause a program to break? It
>>> seems that you're only reinterpreting what would be unterminated
>>> character literals.
>> Ah, you are right. for some reason I was thinking we allowed identifiers
>> to start with ', but yeah. this seems fully backwards compatable. while
>> we are at it, we should allow ' in infix operators to.
>> a *' b = almostMultiply a b
>>         John
> -- 
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell

John Meacham - ⑆repetae.net⑆john⑈

More information about the Haskell mailing list