[Haskell-cafe] type inference and named fields

Christian Maeder maeder at tzi.de
Mon Jun 27 06:30:23 EDT 2005


Malcolm Wallace wrote:
> Yes, I find it interesting that consecutive updates are not equivalent
> to a combined update.  I believe this is largely because named fields
> are defined as sugar - they behave in some sense like textual macros
> in other languages, which can often turn out to have unexpected
> properties.

I share your characterization "like textual macros". The question is,
should this be eliminated? Would it be cleaner, though less convenient
some times, if the types of updated values must not change?

(Of course, it is no realistic option to change that in Haskell, since
probably too much existing code would break.)

Christian


More information about the Haskell-Cafe mailing list