[m-dev.] Re: zero-arity higher-order function terms and apply/1

Andrew Bromage bromage at cs.mu.oz.au
Tue Jul 22 06:28:30 AEST 1997


G'day.

Fergus Henderson wrote:

> However, on second thoughts, it would be useful to allow zero-arity
> higher-order function types.  To create one, you would have to use
> a lambda expression.

Yes.  You can do this with the current compiler (I've done it --- or
at least the compiler didn't complain), it's just apply/1 which the
compiler can't handle.

> This is in contrast to other higher-order function types, where
> you can always just use the function name.  So it is a little
> bit non-orthogonal.

A little bit.  But rules like "If it looks like a function call, it
is, otherwise it's a closure" have been seen in other languages with
little comment.

Cheers,
Andrew Bromage



More information about the developers mailing list