MOO-cows Mailing List Archive


No Subject

To quote the ChangeLog.txt:

-- Added new built-in function `call_function(FNAME, @ARGS)' where FNAME is a
   string naming a built-in function to call and ARGS are the arguments to pass
   to it.  This allows you to compute the name of the function to call and, in
   particular, allows you to write a call to a built-in function that may or
   may not exist in the particular version of the server you're using.

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.

And the allowence of arbitrary variable types isn't much... that can be 
done with:

func = "notify";
who = player;
text = "SPAM";
result = eval(tostr(func,"(",who,",\"",text,"\");"));
result[1] && return result[2];
[error handling stuff here]

Maybe I'm missing something?



Home | Subject Index | Thread Index