[Haskell-cafe] Data constructors

Scott Turner p.turner at computer.org
Sun Apr 25 20:06:04 EDT 2004


On 2004 April 25 Sunday 12:25, Mark Carroll wrote:
> I wish that something like some Type.Constructor syntax
> worked in order to disambiguate. [...]
> I'm not really proposing any changes; more, I'm wondering what others'
> thinking is about this sort of thing - what annoys them, how they get
> around it, etc.
I appreciate the fact that in Haskell, each name refers to one definition.  
The lack of overloading keeps things clear in a way that's a refreshing 
alternative to the C++ that I also use. I work around the interference you 
describe, using constructor names like EmptyList and EmptySet. 

Must function concepts such as 'union' can be made into type classes, to the 
extent that the concept can be described in the type system.

A means of disambiguating names is, to my understanding, in the realm of 
modules.  Types explain _why_ the parts of the program fit together into a 
well-formed whole.  _How_ the parts are connected together, e.g. ensuring 
each reference to name has a corresponding definition, is not a matter of 
types.


More information about the Haskell-Cafe mailing list