MOO-cows Mailing List Archive

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

RE: [SUG] Two changes to the server

>> (2) This has been suggested before, but can we finally expunge all 
>> remaining vestiges of "player" from the server (replacing it with

Make it be "connection" or "line", and I'll agree that it might be worth
the trouble to do so.  Yes, backward compatibility is a bitch, but in
this case, I have reason to believe it might not be so bad.  Here,
compatibility is simply a matter of how we recognize certain builtin
function calls.  The parser could quietly perform the following
translations on input

  boot_player(...)         close_connection(...)
  players(...)             connections(...)
  connected_players(...)   connections_open(...)
  is_player(...)           is_connection(...)
  set_player_flag(...)     set_connection_flag(...)

Ancient code thus encountered would be quietly turned into equivalent
new code.  Nothing would be any different at the bytecode level.  So
long as we resolve NEVER to re-use the old builtin names as names of new
builtins sometime in the future (and as long as nobody is currently
using any odd extensions to the current server in which the above new
builtin function names are used but differently), this will work.

Slightly more controversial would be the substitution

  player                   current_connection

except that I figure if one is going to go to this trouble, one may as
well instead do the substitutions

  player                   current_connection()
  player = X               set_current_connection(X)

thus removing the current bogosity in which "player" is this weird-ass
variable that receives special treatment accorded no other variable
(w.r.t. when one is actually allowed to change it and how this affects
nested calls).  

set_current_connection(X) would, of course, return/raise exactly
whatever (player = X) currently returns/raises.

Home | Subject Index | Thread Index