On 24-Aug-1999, Ronald J. Legere <[EMAIL PROTECTED]> wrote:
>
> It WOULD be nice if you could match on functions and not just
> constructors. But I presume that the constructor/function dichotomy
> in Haskell is what allows it to be strongly typed? For example, in the
> untyped 'language' Mathematica employs, pattern matching is
> allowed on both constructors and functions, and in fact, there is
> no seperate idea of 'constructor', constructors are just functions that
> dont do anything (they dont match any left hand side pattern by
> themselves).
>
> Can someone confirm/deny that strong typing requires this dichotomy?
Strong typing does not prevent pattern matching on functions.
Mercury is strongly typed, but allows pattern matching on functions
(subject to certain restrictions).
--
Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.