Lennart makes the point that a different generalisation of Simon's
suggestion, namely strict constructors, would be more useful.  Perhaps.

A point in favour of my suggestion is that unlifted products have
an easy semantic definition.  What, precisely, is the definition of
a constructor strict in a specified field?  In particular, how do
you define it, and implement it, if that field has a functional
type?  Remember, in Haskell function types are unlifted, so we
should have  (\_ -> bottom) = bottom.

Regardless, I'd like to urge Lennart, Simon, and Paul to perform
experiments to determine the relative costs of lifted and unlifted
products.  We pretty much agreed we ought to perform such an
experiment when we decided on lifted products -- now is the time
to do it.  Lennart writes:

   It would be very easy to measure, but I'm not quite sure what
   you want to measure.  Just unlifted tuples?  In a well-written
   program this would make little difference since it's bad software
   engineering to use tuples, so I wouldn't expect big programs to
   use them a lot (you should define a new type instead of using a 
   tuple since that gives better documentation and types).
   Or should we try and unlift all types with a single constructor?

Yes: try it with all single-constructor types.  Going to unlifted
products should be more expensive: performing an experiment that
de-lifted all single-constructor types would put an upper bound on
the cost.
   
Cheers,  -- P
   
-----------------------------------------------------------------------
Professor Philip Wadler                        [EMAIL PROTECTED]
Department of Computing Science                    tel: +44 41 330 4966
University of Glasgow                              fax: +44 41 330 4913
Glasgow G12 8QQ, SCOTLAND

 

Reply via email to