Hi all,

I'd like to make a few comments on the proposal for simple records in
Haskell 1.3.

* The possibility of having polymorphic field types has been left out
  of the proposal.  Polymorphic field types essentially bring second
  order polymorphism into the language, by allowing function arguments
  to have polymorphic types (wrapped in a record).  IMHO, this is an
  important extension to the language and adds very little
  complexity to the typechecker.

* The operator := was chosen for field initialisation and update, when
  the equals sign (=) would (almost) be sufficient.  It seems the only
  reason we cannot use equals is the new syntax for anonymous updates:

  f = pointX := 1

  which is equivalent to

  f = \p -> p with pointX := 1

  It seems a good compromise to give up this abbreviation and use the
  equals sign for field update.

* There was some discussion before the proposal of having an explicit
  field selection operator (such as '.', '->', or '#') so that the
  namespace for field names can be kept seperate from the general
  function/value namespace.  For the record, I still prefer '->' (pun
  intended :-)

Cheers,
        Simon

--
Simon Marlow                                             [EMAIL PROTECTED]
Research Assistant                          http://www.dcs.gla.ac.uk/~simonm/
finger for PGP pulic key


Reply via email to