The Declaration Approach (was: Some thoughts on the
'reveal' operator)
Mark S. Miller
markm@caplet.com
Thu, 21 Oct 1999 11:32:15 -0700
At 11:01 AM 10/21/99 , Chip Morningstar wrote:
>Any non-keyword symbol is going to be pretty arbitrary (which is why I like
>"reveal") but I *really* dislike "=>". For one thing, the arrow points in the
>wrong direction -- the value comes out of the function, but the arrow points
>into it (when this token was originally suggested, the arrow was pointing at
>the name of the variable that was revealed, not at the function itself).
We have opposite directionality intuitions. For me, "=>" points in exactly the right direction, since an invocation of the function/method declared on the left yields the value that the block on the right evaluates to. Ie,
def square(x) => {x*x}
seems perfectly intuitive to me, while
def square(x) <-- {x*x}
seems completely wrong. But since you strongly have the opposite reaction, the search goes on.
>If we're being completely
>arbitrary anyway, then you might use "@" (which I don't recall having another
>meaning in E).
It has an incompatible use in quasi-literal patterns. See http://www.erights.org/elang/grammar/quasi-overview.html
> The best choice in terms of meaning seems to be "^", but we
>already dismissed that for ergonomic reasons.
Perhaps a variant?
>"&" maybe?
No. "&" is only associated with two meaning-clouds in my head: and-like and address-of. I can't imagine stretching either one to fit.
Cheers,
--MarkM