[Haskell] Extensible records: Static duck typing

Barney Hilken b.hilken at ntlworld.com
Tue Feb 5 06:08:27 EST 2008

Everyone wants to add extensible records to Haskell. The problem is  
that, in a formally defined language like Haskell, we need to agree  
how they should behave, and there are too many conflicting ideas.

I was involved recently in an attempt to try to sort out some of the  
alternatives (recorded here: http://hackage.haskell.org/trac/ghc/wiki/ExtensibleRecords) 
  which collapsed because of argument over a fundamental question:

	Should {label := "Hi", color := blue} and {color := blue, label :=  
"Hi"} have the same type?

One of the main contributors felt that the answer was no (because it  
allows more different records to be represented, and makes  
implementation simpler), and that we should say so. I felt that most  
people would consider that the answer was yes, and that we shouldn't  
make such a fundamental design decision without some evidence about  
what is best in practice.

The result was that our attempt to sort things out stopped.

This sort of disagreement means that nothing gets done. After my  
experience with the wiki page, I don't believe anything will get done  
until one of the core ghc developers makes some arbitrary decisions  
and implements whatever they want to, which will then eventually  
become part of the standard by default.


More information about the Haskell mailing list