[clean-list] Function Arity

Marco Kesseler m.kesseler@aia-itp.com
Thu, 28 Mar 2002 09:31:53 +0100


From: "Sean Seefried" <seefried@itee.uq.edu.au>
> readability of the code.  If function arity is required for efficiency
> reasons could someone please let me know why it is not possible to work
out
> arity information at compile time.  Why does it have to be supplied by the
> programmer?

There is a reason for it, but it eludes me at the moment (maybe later).
However, there is something one could argue about:

> regionToImageC :: Region -> ImageC
> regionToImageC reg p
>       | reg p       = black
>       | otherwise = white

Is this truly more clear? I mean: suppose I do not know what "Region" is,
nor "ImageC", then what is this "p" about? (yes, I have taken things out of
context, but hey, this ought to be referentally transparent).

regards,
Marco

----------------------------------------------------------------------
Aia Software B.V.                     Phone :  +31 24 371 02 30
PO Box 38025                          Fax   :  +31 24 371 02 31
6503 AA Nijmegen                      URL   :  http://www.aia-itp.com
The Netherlands
----------------------------------------------------------------------
This E-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this E-mail in error please notify
the postmaster (postmaster@aia-itp.com). The authenticity of this
message cannot, at this moment, be guaranteed by ourselves. For this
reason no legal rights may be granted should the contents differ to
the original sent message. The Aia log-file of sent messages is deemed
to be the sole, true transcript of communication unless the contrary,
other than the received message, can be proven.
----------------------------------------------------------------------