MOO-cows Mailing List Archive

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

RE: exact name of a property



> Maybe with like verb_info(), property_info() can return something like
> {owner,perms,propertyname}.. I don't think this should be a problem with any
> other code, since I've already tried it with a $bf_property_info and nothing
> else seems to break.

Random warning:  
I strongly suspect a fair amount of code will be rewritten (...insert
tuneless whistle ...) to take advantage of the new scattering assignment
available in 1.8.0.  Thus, while most code may, at the moment, still be
in the form

   pi = property_info(obj,vb);
   owner = pi[1];
   flags = pi[2];

and not break due to your change, I don't doubt that code like

   {owner, flags} = property_info(obj, vb);

will become prevalent in the future.  Nor would I want to do anything to
discourage this.

In general, I would be extremely wary of using the $bf_foo wrappers to
actually change the contract of a builtin function (i.e., what arguments
it expects, what it returns).  Even the possibility of raising errors
other than what the programmers manual specifies should be documented
carefully, if only for the sake of preserving the sanity of your
programmers, let alone the question of placing unnecessary obstacles in
the path of those who might want to port stuff to your MOO.

9 times out of 10, you can probably just write your own function to do
what you want rather than usurping a builtin.




Home | Subject Index | Thread Index