[Nickle]New function syntax
Keith Packard
nickle@nickle.org
Wed, 07 Aug 2002 01:36:29 -0700
Around 1 o'clock on Aug 7, Bart Massey wrote:
> poly() foo = f;
> it is unclear to me whether f is an initializer for foo or an
> expression defining it. Note that it matters.
The = expr syntax only applies to the sugared version of function
declarations
poly foo () = f;
The unsugared version remains:
poly() foo = poly func () { return f; }
> Besides, I don't want to be gratuitously incompatible with
> C, even where C is wartsy...
It's just a terse form for a very common function style, especially when
coding in a functional style.
Keith Packard XFree86 Core Team HP Cambridge Research Lab