MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

No Subject



Rich Connamacher writes:
> How is call_function("notify", player, "SPAM"); any different from 
> eval("notify(player, \"SPAM\");")?  I fail to see how this adds any new 
> functionality to the server, just maybe a slightly more convienent form 
> than eval in some cases.

It's in a much more convenient form (you don't have to muck about with
toliteral() to convert the arguments into literals that can appear in MOO code,
you don't have to deal with issues like forgetting to put in `return' as you
did, etc.) and it works for code that is running with the permissions of a
non-programmer (when `eval' can't be called).  It is admittedly not a great
leap forward in MOO programming power, but it is a sometimes convenient
facility.  For example, the server now recovers from finding calls in the DB
file it's loading to unknown built-in functions; it simply rewrites them on
input into calls to `call_function()' with the obvious arguments.

	Pavel


References:

Home | Subject Index | Thread Index