[Haskell-cafe] Named field syntax

Philip Weaver philip.weaver at gmail.com
Fri Aug 29 23:33:06 EDT 2008


On Fri, Aug 29, 2008 at 1:59 PM, Roman Cheplyaka <roma at ro-che.info> wrote:

> * Johannes Waldmann <waldmann at imn.htwk-leipzig.de> [2008-08-29
> 15:39:15+0200]
> > > data Test = Test Integer {b::String}
> >
> > positional (= unnamed) record notation is a language design error :-)
> > and its use should be discouraged. - J.W.
>
> Polluting namespace with unneeded functions should not be encouraged
> either. Consider for instance defining datatype for 3x3 matrix.
> Would the absence of unnamed record notation make you more happy?
>

Also, if positional record notation is a design error, then is it also a
design error not to require all arguments to be explicitly associated with
named formal parameters at a function call site (e.g. f(x = 1, y = 2, z =
3))?


>
> --
> Roman I. Cheplyaka :: http://ro-che.info/
> kzm: My program contains a bug. How ungrateful, after all I've done for it.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080829/9b47f9e2/attachment.htm


More information about the Haskell-Cafe mailing list