On 12/22/08, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> f(1) => f(1)
> (f+0)(1) => f(1)
> "f"(1) => f(1)
> ("f")(1) => f(1)
> ("f"+0)(1) => ERROR
> funmake("f",[1]) => ERROR
> funmake("f"+0,[1]) => ERROR
> "+"(1,2) => 3
> funmake("+",[1,2]) => 3
> funmake("+"+0,[1,2]) => 3
> ("+" + 0)(1,2) => ERROR
> Does everyone agree that this is inconsistent behavior and that it would be
> better not to have errors in the cases above?
On the whole, automatic coercion (strings to symbols here) makes
me a little uneasy, but I see that already in something like "foo"(1),
"foo" is automatically verbified (even if it is not the name of an operator).
So for consistency, anything which evaluates to "foo" (e.g. "foo" + 0)
should be treated the same, and alternate constructs apply("foo", [1])
and funmake("foo", [1]) ought to be treated the same.
Instead of expanding the application of verbify, we could banish
automatic verbification except for declared operators.
I'm not sure yet, but I 'm leaning towards restricted verbification.
best
Robert