MOO (programming language)

MOO (programming language)

Infobox programming language
name = MOO

paradigm = multi-paradigm: structured, Prototype-based
year = 1990
designer = Stephen F. White
developer = Stephen F. White & Pavel Curtis
latest release version = 1.7.6
latest release date = August, 1993
typing = dynamic
implementations = MOO
dialects =
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.

Example

@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 . [ [http://www.fringenet.net/MOO/yduJtut.txt yduJ's Programming Tutorial] ]

See also

* MOO (game system)

Notes and references

External links

* The [http://www.ipomoea.org/moo/pm1.8.1/ LambdaMOO Programmer's Manual] is the definitive reference for the MOO programming language.

* [http://www.amazon.com/Secrets-Mud-Wizards-Programming-Role-Playing/dp/0672307235 Secrets Of The Mud Wizards] Chapter 14: Programming MOOs is a 60 page tutorial.


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Object-oriented programming language — An object oriented programming language (also called an OO language ) is one that allows or encourages, to some degree, object oriented programming techniques such as encapsulation, inheritance, modularity, and polymorphism. Simula (1967) is… …   Wikipedia

  • MOO — For other uses, see Moo (disambiguation). A MOO (MUD, object oriented[1]) is a text based online virtual reality system to which multiple users (players) are connected at the same time. The term MOO is used in two distinct, but related, senses.… …   Wikipedia

  • Moo — The term moo can refer to: The sound made by a cow or bull Moo (novel), by Jane Smiley Moo (Monster Rancher), a character in the Monster Rancher anime Melody of Oblivion, an anime In Computing: MOO, term for any text based online virtual reality… …   Wikipedia

  • MOO-XMPP — Infobox Software name = MOO XMPP caption = developer = author = Kenny Root released = ? frequently updated = yes programming language = ? operating system = Linux, Windows platform = MOO language = English genre = Instant messaging client license …   Wikipedia

  • List of programming languages by category — Programming language lists Alphabetical Categorical Chronological Generational This is a list of programming languages grouped by category. Some languages are listed in multiple categories. Contents …   Wikipedia

  • List of programming languages — Programming language lists Alphabetical Categorical Chronological Generational The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in… …   Wikipedia

  • Reflection (computer programming) — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computi …   Wikipedia

  • Prototype-based programming — is a style of object oriented programming in which classes are not present, and behavior reuse (known as inheritance in class based languages) is performed via a process of cloning existing objects that serve as prototypes. This model can also be …   Wikipedia

  • Weird Programming — Esoterische Programmiersprachen sind Programmiersprachen, die nicht für den praktischen Einsatz entwickelt wurden, sondern ungewöhnliche Sprachkonzepte umsetzen. Eine einfache Bedienung ist selten, teilweise werden Sprachen konzipiert, um… …   Deutsch Wikipedia

  • Computer-assisted language learning — (CALL) is succinctly defined in a seminal work by Levy (1997: p. 1) as the search for and study of applications of the computer in language teaching and learning .[1] CALL embraces a wide range of ICT applications and approaches to teaching… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”