On Wed, Sep 1, 2010 at 9:21 PM, William Leslie <[email protected] > wrote:
> On 2 September 2010 03:40, Jonathan S. Shapiro <[email protected]> wrote: > > I have been thinking more about mixfix and its relationship to macro > > processing. Actually, this was prompted in part by a weird thought > > concerning blocks. > > > > But if and, for example, always expected a function, and the function > itself had to be explicit, you would get > > if {foo} and {{bar} or {baz}} then ... > I never said the thunking had to be explicit. My intention was that the caller would still write: if foo and bar or baz then ... Mark Miller has persuaded me that I should wait until there is a compelling use case. I had intended to do that in any case; I was mainly asking to find out if a compelling use case might already be known. The thunking of sequences idea was for something else. It lets me write: mixfix while_do_ = WhileDo def WhileDo(tst : bool, body: fn () -> 'a) = if tst then body() else () That is: if blocks are a lightweight lambda, it becomes possible to introduce forms that do something like control flow without reaching for macros. The ByNeed idea was for dealing with things like AND, where we don't want syntactically explicit thunkification at the call site. shap
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
