MOO (programming language)

From Wikipedia, the free encyclopedia

Jump to: navigation, search
MOO
Paradigm multi-paradigm: structured, Prototype-based
Appeared in 1990
Designed by Stephen F. White
Developer Stephen F. White & Pavel Curtis
Typing discipline dynamic
Major implementations MOO
Influenced by Algol, Lisp, Scheme, Smalltalk, Self, C
Influenced CoolMUD, ColdC

The MOO programming language is a programming language used to support the MOO system. It is a dynamically typed prototype based object oriented system, with syntax roughly derived from the Algol school of programming languages.

The language has explicit exception handling control flow, as well as traditional looping constructs. A verb and property hierarchy provides default values to prototype objects, with over-riding values lower in the hierarchy. This hierarchy of objects is maintained through delegation to an object's "parent" property, resulting in a form of single inheritance. Special security-related attributes of objects, verbs, and properties include ownership, and read, write and execute flags. MOO programs are byte-code compiled, with implicit decompilation when editing, providing a canonical form of programs.

MOO programs are orthogonally persistent through periodic checkpoints. Objects are identified by a unique integer identifier. Unused program data is eliminated through automatic garbage collection (implemented by reference counting). However, MOO objects themselves are not garbage collected and are manually deleted by their owners or superusers (aka wizards) through a process called 'recycling.'

MOO is explicitly a multi-user system and programs (verbs) are contributed by any number of connected users. A distinction is made between the 'driver' (runtime) and 'core' (programs written in the MOO language.) The vast majority of the functionality of a running MOO is handled 'in-core.'

The runtime supports multi-tasking using a retribution based time slicing method. Verbs run with exclusive access to the database, so no explicit locking is necessary to maintain synchronization. Simple TCP/IP messaging (telnet compatible) is used to communicate with client sockets, each of which is identified with a 'player' in the Virtual reality representation system.

The language supports weak references to objects by number, and to properties and verbs through strings. Built-in functions to retrieve lists of properties and verbs exist, giving the language runtime facilities for reflection. The server also contains support for wildcard verb matching, so the same code can easily be used to handle multiple commands with similar names and functions.

Available sequence types in MOO are lists and strings. Both support random access, as well as head and tail operations similar to those available in functional programming languages like Lisp. All operations on lists and strings are non-destructive, and all non-object datatypes are immutable. Built-in functions and libraries allow lists to also be used as associative arrays and ordered and unordered sets.

Contents

@program toy:wind
if (this.location == player)
  if (this.wound < this.maximum)
    this.wound = this.wound + 2;
    player:tell("You wind up the ", this.name,".");
    player.location:announce(player.name, " winds up the ", this.name,".");
    if (this.wound >= this.maximum)
      player:tell("The knob comes to a stop while winding.");
    endif
  else
    player:tell("The ",this.name," is already fully wound.");
  endif
else
  player:tell("You have to be holding the ", this.name,".");
endif
.

[1]

  • MOO (game system)

  1. ^ yduJ's Programming Tutorial

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.