MOO-cows Mailing List Archive


Re: Builtins [LPMOO]

>On Tue, 12 Sep 1995, Kipp quoted Robert Leslie:
>>   - program the verb, replacing the unknown() with E_VERBNF:unknown()
>Without reading ahead, I think this is the best idea... or you could add 
>a new error, E_BFNF?

What about replacing it with E_INVIND:unknown(), isn't that more intutitive?
 Even so:

;E_INVIND:bf() => E_TYPE


;$nothing:bf() => E_INVIND

More indictive of what the error actually was, with out having to actually 
 add a new error code. Mmh.. a new error might be the way to go, since
 none of the current error codes are really made for errors resulting from
 unknown()'s.  You could argue that E_VERBNF is a more obvious choice for
 something now found...

>>   - program the verb, replacing the unknown() with "unknown()"

Problem with this is that you won't know what bf was missing so you won't be
 able to fix the verb right away... you'd still have to port the code from
 somewhere else.

>>   - allow any unknown() to exist, but always raise E_VERBNF upon execution

I like it.  Kipp's E_BFNF would be a good replacement here instead of E_VERBNF.

>>   - allow any unknown() to exist, and bind the function at runtime; perhaps
>>     redirect it to #0:unknown()
>By far the best idea.  Then maybe raise E_BFNF if the verb isn't on #0.  
>This will allow you to write some nifty things that seem like builtins, 
>just to be compatable with other LambdaMOO builtins...

This is all fine and dandy, but doesn't this idea then lead to the bfs
 server_started(), do_login_command(), etc?  While you should have security
 in those verbs to make sure they are server tasks, it'll just be messy.
 Perhaps redirecting them to $bf or something.  But that has other problems
 as well... mmh...
Also, using run time binding, with no outside way to determine which functions
 to bind other than that 'a verb on #0 can be called as a builtin', could
 lead to some weird security breaches and confusion.  Perhaps having some
 compile time (doubt it) or start up time options (better) to determine which
 ones to use; read from a file maybe?
I don't think anyone should be able to willy-nilly overload a bf.
  ______                              __
    /   /  Andy Bakun     _/_      / /  `  /)  /)       _/_
 --/   /_  , , , __.  __  /  _  __/ /--   //  //  __,_  /  _
(_/   / /_(_(_/_(_/|_/ (_<__</_(_/ (___, //__//__(_) (_<__/_)_
  How much head could a bonehead bone   />  />
    if a bonehead could bone head?     //  //    </  </  

Home | Subject Index | Thread Index