ColdC
Encyclopedia
ColdC is a programming language
, originally designed for ColdMUD
by Greg Hudson
in 1993, but with some applications in fields unrelated to MUD
s. It is a dynamically typed prototype-based
object oriented system, with a syntax derived from the C programming language
. It is similar to the MOO programming language
in that it operates in a runtime which provides persistence (through an object database
) and network access.
ColdC includes many of the attributes that made their debut with the CoolMUD
system and programming language, such as:
In addition, there are some specific innovations that ColdC added:
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....
, originally designed for ColdMUD
ColdMUD
ColdMUD is a type of MUD server software, similar in many ways to MOO and CoolMUD, from which it is descended. It is a text-based online virtual reality system to which multiple users are connected at the same time. Created by Greg Hudson, it has many similarities to both MOO and CoolMUD...
by Greg Hudson
Greg Hudson
Greg Hudson is an American football coach . He currently serves as the linebackers coach at Florida State. He has also served as a defensive assistant at Minnesota, Cincinnati and Connecticut and most recently as a defensive coordinator at East Carolina....
in 1993, but with some applications in fields unrelated to MUD
MUD
A MUD , pronounced , is a multiplayer real-time virtual world, with the term usually referring to text-based instances of these. MUDs combine elements of role-playing games, hack and slash, player versus player, interactive fiction, and online chat...
s. It is a dynamically typed prototype-based
Prototype-based programming
Prototype-based programming is a style of object-oriented programming in which classes are not present, and behavior reuse is performed via a process of cloning existing objects that serve as prototypes. This model can also be known as classless, prototype-oriented or instance-based programming...
object oriented system, with a syntax derived from the C programming language
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
. It is similar to the MOO programming language
MOO programming language
The MOO programming language is a relatively simple programming language used to support the MOO Server. It is dynamically typed and uses a prototype-based object-oriented system, with syntax roughly derived from the Algol school of programming languages....
in that it operates in a runtime which provides persistence (through an object database
Object database
An object database is a database management system in which information is represented in the form of objects as used in object-oriented programming...
) and network access.
ColdC includes many of the attributes that made their debut with the CoolMUD
CoolMUD
CoolMUD is a type of MUD, and a descendant of MOO. It is a text-based online virtual reality system to which multiple users are connected at the same time...
system and programming language, such as:
- Instance variableInstance variableIn object-oriented programming with classes, an instance variable is a variable defined in a class , for which each object of the class has a separate copy. They live in memory for the life of the object....
s ("properties" in MOO) are all private and not externally visible. MethodsMethod (computer science)In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...
("verbs" in MOOMOOA MOO is a text-based online virtual reality system to which multiple users are connected at the same time.The term MOO is used in two distinct, but related, senses...
) must be written to expose them. This is similar to early object-oriented languages such as SmalltalkSmalltalkSmalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist...
. - There are no builtin properties for owner and location like in MOOMOOA MOO is a text-based online virtual reality system to which multiple users are connected at the same time.The term MOO is used in two distinct, but related, senses...
. This was done partly to simplify the language and partly to permit more versatile applications. - There are no facilities for ownership of objects or code security, as strong encapsulation permits these facilities to be written in the ColdC language itself.
- Multiple parent relationships, that is multiple objects from which an object can inherit behaviour.
In addition, there are some specific innovations that ColdC added:
- A new datatype for lightweight, immutable objectImmutable objectIn object-oriented and functional programming, an immutable object is an object whose state cannot be modified after it is created. This is in contrast to a mutable object, which can be modified after it is created...
s; whimsically called "frobs". - An associative arrayAssociative arrayIn computer science, an associative array is an abstract data type composed of a collection of pairs, such that each possible key appears at most once in the collection....
datatype.