On Tue, Aug 10, 2010 at 7:01 PM, Jonathan S. Shapiro <s...@eros-os.org>wrote:
> 1. I can probably jigger the productions around to make this okay > if we have to, giving: > > 'a -> 'b > noalloc 'a -> 'b > > 2. Failing that, we can use the FN keyword only when an effect > is present on the type, giving: > > 'a -> 'b > noalloc fn 'a -> 'b > > From an english-language readability perspective I almost prefer "noalloc > fn 'a -> 'b", but I have no strong preference. > Perhaps one should opt for consistency one way or the other, that is, either fn everywhere, or fn nowhere. Otherwise there is an extra rule the programmers need to remember, i.e. "when specifying an effect type for a function, you need to insert the fn keyword." It seems this would incur a small amount of extra cognitive processing every time someone writes down a function type with an effect, at least until it became deeply ingrained habit (and even then I'm not sure it would disappear entirely). Is it significantly faster to parse when "fn" is always there? What about the option of using "fn" in place of "lambda" for anonymous functions? I tend to find "lambda" to be a bit too verbose (anyone agree?). Paul Graham's Arc language does this. Chris
_______________________________________________ bitc-dev mailing list bitc-dev@coyotos.org http://www.coyotos.org/mailman/listinfo/bitc-dev