The Declaration Approach (was: Some thoughts on the
'reveal' operator)
Mark S. Miller
markm@caplet.com
Fri, 22 Oct 1999 08:32:56 -0700
At 06:43 AM 10/22/99 , Douglas Crockford wrote:
>Perhaps
>
> to foo(x) < booga(x) >
>
> produces { booga(x) }
>
>and
>
> to foo(x) { booga(x) }
>
> produces { booga(x) null }
>
>The idea here is that the leakability of an outer block is determined by the
>delimiters of the block. The <> delimiters are probably a bad choice here
>because of confusion with GREATERTHAN, but the idea is that <> blocks are
>productive and {} blocks are not.
Good, I like the bracketing approach. I also agree that angle brackets are bad, but if suitable brackets could be found, this might be the best thing. However, just to clarify, E must expand to Kernel E, and Kernel E must be a subset of E. Therefore, I think you wanted to say
to foo(x) < booga(x) >
expands to
to foo(x) < booga(x) >
and
to foo(x) { booga(x) }
expands to
to foo(x) <
booga(x)
null
>
However, since we're agreed that angle brackets are bad, "reveal" remains the best concrete proposal.
Cheers,
--MarkM