Information about Reflection (computer Science)
In computer science, reflection is the process by which a computer program of the appropriate type can be modified in the process of being executed, in a manner that depends on abstract features of its code and its runtime behavior. Figuratively speaking, it is then said that the program has the ability to "observe" and possibly to modify its own structure and behavior. The programming paradigm driven by reflection is called reflective programming.
Typically, reflection refers to runtime or dynamic reflection, though some programming languages support compile time or static reflection. It is most common in high-level virtual machine programming languages like Smalltalk, and less common in lower-level programming languages like C.
At the lowest level, machine code can be treated reflectively because the distinction between instruction and data becomes just a matter of how the information is treated by the computer. Normally, 'instructions' are 'executed' and 'data' are 'processed', however, the program can also treat instructions as data and therefore make reflective modifications.
With higher level languages, when program source code is compiled, information about the structure of the program is normally lost as lower level code (typically machine language code) is produced. If a system supports reflection, the structure is preserved as metadata with the emitted code.
In languages that do not make a distinction between runtime and compile-time (Lisp, Forth and MUMPS, for example), there is no difference between compilation or interpretation of code and reflection.
Any computation can be classified as either of two:
Reflection can also be used to adapt a given system dynamically to different situations. Consider, for example, an application that uses some class X to communicate with some service. Now suppose it needed to communicate with a different service, via a different class Y, which has different method names. If the method names were hard coded into the application, it would need to be rewritten, but if it used reflection this could be avoided. Using reflection, the application would have a knowledge about the methods in class X. And class X could be designed to provide information regarding which method is being used for what purpose. The application, depending on what it has to do, would select the required method and use it. Now, when the different service is being used, via class Y, the application would search the methods in the new class to find the required methods and use them. No modification of the code is necessary. Even the class name need not be hard coded, rather it can be stored in a configuration file, it will be correctly searched for and loaded at run time.
Reflection is also a key strategy for metaprogramming.
Compiled languages rely on their runtime system to provide information about the source code. A compiled Objective-C executable, for example, records the names of all methods in a block of the executable, providing a table to correspond these with the underlying methods (or selectors for these methods) compiled into the program. In a compiled language that supports runtime creation of functions, such as Common Lisp, the runtime environment must include a compiler or an interpreter.
Reflection can be implemented for languages not having built-in reflection facilities by using a program transformation system to define automated source code changes..
"with partial reflection"; foo:("hello")();
// Without reflection [Foo alloc] init] hello];
// With reflection Class aClass = NSClassFromString(@"Foo"); SEL aSelector = NSSelectorFromString(@"hello"); // or @selector(hello) if the method // name is known at compile time [aClass alloc] init] performSelector:aSelector];
// Without reflection var foo:Foo = new Foo(); foo.hello();
// With reflection var ClassReference:Class = flash.utils.getDefinitionByName("Foo"); var instance:Object = new ClassReference(); instance.hello();
Even with an import statement on “Foo”, the method call to “getDefinitionByName” will break without an internal reference to the class. The reason for this is because runtime compilation of source is NOT allowable at the current time. Maybe in the future it might, but not now. To get around this, you have to have at least one instantiation of the class type in your code for the above to work. So in your class definition you declare a variable of the custom type you want to use:
var customType : Foo;
So for the idea of dynamically creating a set of views in Flex 2 using these methods in conjunction with an xml file that may hold the names of the views you want to use, in order for that to work, you will have to instantiate a variable of each type of view that you want to utilize.
// Without reflection new Foo().hello()
// With reflection
// assuming that Foo resides in this (new this['Foo']()) ['hello']()
// or without assumption (new (eval('Foo'))()) ['hello']()
However, this works only for symbols in topmost lexical environment (or dynamic one). Better example, using CLOS, is:
This code is equivalent to Java's one.
// Without reflection hello
// With reflection doString("hello")
"Without reflection" Foo new hello
"With reflection" (Compiler evaluate: 'Foo') new perform: #hello
The class name and the method name will often be stored in variables and in practice runtime checks need to be made to ensure that it is safe to perform the operations:
Smalltalk also makes use of blocks of compiled code that are passed around as objects. This means that generalised frameworks can be given variations in behavior for them to execute. Blocks allow delayed and conditional execution. They can be parameterised. (Blocks are implemented by the class Context).
X := [ :op | 99 perform: op with: 1]. ".....then later we can execute either of:" X value: #+ "which gives 100, or" X value: #- "which gives 98."
The function loadstring compiles the chunk and returns it as a parameterless function.
If hello is a global function, it can be acessed by using the table _G:
The following example, written in C#, demonstrates the use of advanced features of reflection. The program takes the name of an assembly as input from the command-line. An assembly can be thought of as a class library. The assembly is loaded, and reflection is used to find its methods. For each method, it uses reflection to find whether it was recently modified or not. If it was recently modified, and if it does not require any parameters, the name and return type of the method is displayed.
To find whether a method was recently modified or not, the developer needs to use a custom attribute, to define the method as recently modified, and the assembly which contains the class is attributed to be supporting the attribute. The presence of the attribute denotes the method to be recently modified, and its absence denotes it to be old. An attribute is metadata regarding the program structure, here a method. An attribute is itself implemented as a class. When using the assembly, the program loads the assembly dynamically at runtime, and checks the assembly for the attribute which says that the assembly supports the attribute which specifies methods as old or recently modified. If it is supported, names of all the methods are then retrieved. For each method, its attributes are retrieved. If the attribute which marks the method as new is present, the list of parameters which the method takes is retrieved. If the list is empty, i.e., the method does not take any arguments, it is printed along with the return type of the method and the comment that the developer might have added to make the attribute, which defines the method to be recent more informatively.
Typically, reflection refers to runtime or dynamic reflection, though some programming languages support compile time or static reflection. It is most common in high-level virtual machine programming languages like Smalltalk, and less common in lower-level programming languages like C.
At the lowest level, machine code can be treated reflectively because the distinction between instruction and data becomes just a matter of how the information is treated by the computer. Normally, 'instructions' are 'executed' and 'data' are 'processed', however, the program can also treat instructions as data and therefore make reflective modifications.
With higher level languages, when program source code is compiled, information about the structure of the program is normally lost as lower level code (typically machine language code) is produced. If a system supports reflection, the structure is preserved as metadata with the emitted code.
In languages that do not make a distinction between runtime and compile-time (Lisp, Forth and MUMPS, for example), there is no difference between compilation or interpretation of code and reflection.
Reflective paradigm
Reflective programming is a programming paradigm, used as an extension to the object-oriented programming paradigm, to add self-optimization to application programs, and to improve their flexibility. In this paradigm, computation is equated not with a program but with execution of a program. Other imperative approaches, such as procedural or object-oriented paradigm, specify that there is a pre-determined sequence of operations (function or method calls), that modify any data or object they are given. In contrast, the reflective paradigm states that the sequence of operations won't be decided at compile time, rather the flow of sequence will be decided dynamically, based on the data that need to be operated upon, and what operation needs to be performed. The program will only code the sequence of how to identify the data and how to decide which operation to perform.Any computation can be classified as either of two:
- Atomic - The operation completes in a single logical step, such as addition of two numbers.
- Compound - Defined as a sequence of multiple atomic operations.
Uses of reflection
Reflection can be used for self-optimization or self-modification of a program. A reflective sub-component of a program will monitor the execution of a program and will optimize or modify itself according to the function the program is solving. This is done by modifying the program's own memory area, where the code is stored.Reflection can also be used to adapt a given system dynamically to different situations. Consider, for example, an application that uses some class X to communicate with some service. Now suppose it needed to communicate with a different service, via a different class Y, which has different method names. If the method names were hard coded into the application, it would need to be rewritten, but if it used reflection this could be avoided. Using reflection, the application would have a knowledge about the methods in class X. And class X could be designed to provide information regarding which method is being used for what purpose. The application, depending on what it has to do, would select the required method and use it. Now, when the different service is being used, via class Y, the application would search the methods in the new class to find the required methods and use them. No modification of the code is necessary. Even the class name need not be hard coded, rather it can be stored in a configuration file, it will be correctly searched for and loaded at run time.
Reflection is also a key strategy for metaprogramming.
Implementation
A language supporting reflection provides a number of features available at runtime that would otherwise be very obscure or impossible to accomplish in a lower-level language. Some of these features are the abilities to:- Discover and modify source code constructions (such as code blocks, classes, methods, protocols, etc.) as a first-class object at runtime.
- Convert a string matching the symbolic name of a class or function into a reference to or invocation of that class or function.
- Evaluate a string as if it were a source code statement at runtime.
Compiled languages rely on their runtime system to provide information about the source code. A compiled Objective-C executable, for example, records the names of all methods in a block of the executable, providing a table to correspond these with the underlying methods (or selectors for these methods) compiled into the program. In a compiled language that supports runtime creation of functions, such as Common Lisp, the runtime environment must include a compiler or an interpreter.
Reflection can be implemented for languages not having built-in reflection facilities by using a program transformation system to define automated source code changes..
Examples
Java
The following is an example in Java using the Java packagejava.lang.reflect. Consider two pieces of code
>
// Without reflection
Foo foo = new Foo();
foo.hello();
// With reflection
Class cls = Class.forName("Foo");
Method method = cls.getMethod("hello", null);
method.invoke(cls.newInstance(), null);
Both code fragments create an instance of a class Foo and call its hello() method. The difference is that, in the first fragment, the names of the class and method are hard-coded; it is not possible to use a class of another name. In the second fragment, the names of the class and method can easily be made to vary at runtime. The downside is that the second version is harder to read, and is not protected by compile-time syntax and semantic checking. For example, if no class Foo exists, an error will be generated at compile time for the first version. The equivalent error will only be generated at run time for the second version.
PHP
Here is an equivalent example in PHP:> # without reflection $Foo = new Foo(); $Foo->hello(); # with reflection $class = "Foo"; $method = "hello"; $object = new $class(); $object->$method();
Perl
Here is an equivalent example in Perl:> # without reflection my $foo = Foo->new(); $foo->hello(); # with reflection my $class = "Foo"; my $method = "hello"; my $object = $class->new(); $object->$method();
Ruby
Here is an equivalent example in Ruby:- without reflection
- with reflection
Windows PowerShell
Here is an equivalent example in Windows PowerShell:- without reflection
- with reflection
MOO
Here is an equivalent example in MOO: "without reflection"; foo:hello();"with partial reflection"; foo:("hello")();
Python
Here is an equivalent example in Python:> # without reflection Foo().hello() # with reflection getattr(globals()['Foo'](), 'hello')()
Objective-C
Here is an equivalent example in Objective-C (using Cocoa runtime):// Without reflection [Foo alloc] init] hello];
// With reflection Class aClass = NSClassFromString(@"Foo"); SEL aSelector = NSSelectorFromString(@"hello"); // or @selector(hello) if the method // name is known at compile time [aClass alloc] init] performSelector:aSelector];
C++
Although the language itself does not provide any support for reflection, there are some attempts based on templates, RTTI information, using debug information provided by the compiler, or even patching the GNU compiler to provide extra information.ActionScript
Here is an equivalent example in ActionScript:// Without reflection var foo:Foo = new Foo(); foo.hello();
// With reflection var ClassReference:Class = flash.utils.getDefinitionByName("Foo"); var instance:Object = new ClassReference(); instance.hello();
Even with an import statement on “Foo”, the method call to “getDefinitionByName” will break without an internal reference to the class. The reason for this is because runtime compilation of source is NOT allowable at the current time. Maybe in the future it might, but not now. To get around this, you have to have at least one instantiation of the class type in your code for the above to work. So in your class definition you declare a variable of the custom type you want to use:
var customType : Foo;
So for the idea of dynamically creating a set of views in Flex 2 using these methods in conjunction with an xml file that may hold the names of the views you want to use, in order for that to work, you will have to instantiate a variable of each type of view that you want to utilize.
ECMAScript (JavaScript)
Here is an equivalent example in ECMAScript:// Without reflection new Foo().hello()
// With reflection
// assuming that Foo resides in this (new this['Foo']()) ['hello']()
// or without assumption (new (eval('Foo'))()) ['hello']()
Common Lisp
Here is an equivalent example in Common Lisp:- ;Without reflection
- ;With reflection
- ;or
However, this works only for symbols in topmost lexical environment (or dynamic one). Better example, using CLOS, is:
- ;Method hello is called on instance of class foo.
- ;or
This code is equivalent to Java's one.
Scheme
Here is an equivalent example in Scheme:- Without reflection
- With reflection
- With reflection via string using string I/O ports
Io
Here is an equivalent example in Io:// Without reflection hello
// With reflection doString("hello")
Smalltalk
Here is an equivalent example in Smalltalk:"Without reflection" Foo new hello
"With reflection" (Compiler evaluate: 'Foo') new perform: #hello
The class name and the method name will often be stored in variables and in practice runtime checks need to be made to ensure that it is safe to perform the operations:
>"With reflection"
| x y className methodName |
className := 'Foo'.
methodName := 'hello'.
x := (Compiler evaluate: className).
(x isKindOf: Class) ifTrue: [
y := x new.
(y respondsTo: methodName asSymbol) ifTrue: [
y perform: methodName asSymbol
]
]
Smalltalk also makes use of blocks of compiled code that are passed around as objects. This means that generalised frameworks can be given variations in behavior for them to execute. Blocks allow delayed and conditional execution. They can be parameterised. (Blocks are implemented by the class Context).
X := [ :op | 99 perform: op with: 1]. ".....then later we can execute either of:" X value: #+ "which gives 100, or" X value: #- "which gives 98."
Lua
Here's an equivalent example in Lua:
-- Without reflection
hello()
-- With reflection
loadstring("hello()")()
The function loadstring compiles the chunk and returns it as a parameterless function.
If hello is a global function, it can be acessed by using the table _G:
-- Using the table _G, which holds all global variables
_G["hello"]()
C#
Here is an equivalent example in C#:>
//Without reflection
Foo foo = new Foo();
foo.Hello();
//With reflection
Type t = Assembly.GetCallingAssembly().GetType("FooNamespace.Foo");
t.InvokeMember("Hello", BindingFlags.InvokeMethod, null, Activator.CreateInstance(t), null);
The following example, written in C#, demonstrates the use of advanced features of reflection. The program takes the name of an assembly as input from the command-line. An assembly can be thought of as a class library. The assembly is loaded, and reflection is used to find its methods. For each method, it uses reflection to find whether it was recently modified or not. If it was recently modified, and if it does not require any parameters, the name and return type of the method is displayed.
To find whether a method was recently modified or not, the developer needs to use a custom attribute, to define the method as recently modified, and the assembly which contains the class is attributed to be supporting the attribute. The presence of the attribute denotes the method to be recently modified, and its absence denotes it to be old. An attribute is metadata regarding the program structure, here a method. An attribute is itself implemented as a class. When using the assembly, the program loads the assembly dynamically at runtime, and checks the assembly for the attribute which says that the assembly supports the attribute which specifies methods as old or recently modified. If it is supported, names of all the methods are then retrieved. For each method, its attributes are retrieved. If the attribute which marks the method as new is present, the list of parameters which the method takes is retrieved. If the list is empty, i.e., the method does not take any arguments, it is printed along with the return type of the method and the comment that the developer might have added to make the attribute, which defines the method to be recent more informatively.
>
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using Recent;
namespace Reflect
{
class Program
{
private Assembly a;
Program(String assemblyName)
{
a = Assembly.Load(new AssemblyName(assemblyName));
//Make sure the assembly supports the DateCreated attribute
Attribute c=Attribute.GetCustomAttribute(a, typeof(SupportsRecentlyModifiedAttribute));
if (c == null)
{
//Retrieval of "SupportsRecentlyModified" attribute failed.
//This means that the assembly probably doesn't support it.
throw new Exception(assemblyName + " does not support required attributes");
}
Console.WriteLine("Loaded: " + a.FullName);
}
public void FindNewMethodsWithNoArgs()
{
//Get all types defined in the assembly
Type[] t = a.GetTypes();
foreach (Type type in t)
{
//If this type is not a class, skip it and try the next type
if (!type.IsClass)
continue;
Console.WriteLine("Class: " + type.FullName);
MethodInfo[] methods = type.GetMethods();
foreach (MethodInfo method in methods)
{
object[] b = method.GetCustomAttributes(typeof(RecentlyModifiedAttribute), true);
//If no attribute is retrieved, the method is old.
if (b.Length != 0)
{
//Otherwise, only one attribute will be received, as "RecentlyModified" does
//not support usage with another attribute
Console.Write("\tNew Method: " + method.Name);
//A class representing "RecentlyModifiedAttribute" is instantiated
//from the attribute and it is used to retrieve the comment that
//the developer put in.
ParameterInfo[] pinfo = method.GetParameters();
if (pinfo.Length > 0)
break;
Console.WriteLine("\t" + (b[0] as RecentlyModifiedAttribute).comment);
Console.WriteLine("\t\tReturn type: " + method.ReturnType.Name);
}
}
}
}
static void Main(string[] args)
{
try
{
Program reflector = new Program("UseAttributes");//Console.ReadLine());
reflector.FindNewMethodsWithNoArgs();
}
catch (Exception e)
{
Console.Error.WriteLine(e.Message);
}
}
}
}
The implementation of the custom attributes is shown here.
>
using System;
using System.Collections.Generic;
using System.Text;
namespace Recent
{
//Make sure the attribute is applied only to methods
//and that it can not be used with other attributes.
[AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class RecentlyModifiedAttribute : Attribute
{
//The Attribute is expected to be used on methods without any arguments
//(as in [RecentlyModified])
//or with comments (as in [RecentlyModified(comment="")])
private String Comment = "This method has recently been modified";
public RecentlyModifiedAttribute()
{
//This is an empty constructor handling instantiation of the attribute
//It is empty because no arguments is necessary for use of the attribute
}
//Optional named argument "comment" has to be supported. So a property "comment" is defined
//specifying how to handle the comment. It has to be used as a named argument when the
//Attribute is being used. This will tell the compiler which property handles the argument.
public String comment
{
get
{
return Comment;
}
set
{
Comment = comment;
}
}
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple=false)]
public class SupportsRecentlyModifiedAttribute : Attribute
{
//The attribute is to be used with classes without any arguments
//as in [SupportsRecentlyModified]
public SupportsRecentlyModifiedAttribute()
{
//The constructor is empty because no arguments are required to use the attribute
}
}
}
And the usage of the custom attributes, defined above, in building a class is shown here.
>
using System;
using System.Collections.Generic;
using System.Text;
using Recent;
//Use "SupportsRecentlyModified" attribute to specify that the
//assembly supports the "RecentlyModified" attribute
[assembly: SupportsRecentlyModified]
namespace Reflect
{
class UseAttributes
{
private Object info;
public UseAttributes()
{
info = (object) "Hello World";
}
public void OldMethodWithNoArgs()
{
Console.WriteLine("This is an old method which takes no arguments.");
}
//Use the "RecentlyModified" attribute to specify that the method was recently modified.
[RecentlyModified]
public void NewMethodWithNoArgs()
{
Console.WriteLine("This is a recently modified method that takes no arguments.");
}
public void OldMethodWithOneArg(object something)
{
info = something;
Console.WriteLine("This is an old method that takes one argument.");
}
[RecentlyModified]
public void NewMethodWithOneArg(object something)
{
info = something;
Console.WriteLine("This is a new method that takes one argument.");
}
}
}
See also
- Type introspection
- Self-modifying code
- Programming paradigms
- List of reflective programming languages and platforms
References
External links
- Reflection in logic, functional and object-oriented programming: a Short Comparative Study (Citeseer page).
- An Introduction to Reflection-Oriented Programming
- Reflection in C++/CLI for .Net
- Reflection for C++
- Aspects of Reflection in C++
- LibReflection: A reflection library for C++.
- A library to provide full reflection for C++ through template metaprogramming techniques.
- A c++ reflection-based data dictionary
Further reading
- Ira R. Forman and Nate Forman, Java Reflection in Action (2005), ISBN 1932394184
- Ira R. Forman and Scott Danforth, Putting Metaclasses to Work (1999), ISBN 0-201-43305-2
Types of Programming languages |
|---|
| Array Assembly Compiled Concurrent Curly bracket Data-structured Declarative Esoteric Data-oriented Extension Functional Interpreted Logic Machine Macro Metaprogramming Multi-paradigm Non-English-based Object-oriented Prototype-based Off-side rule Procedural Reflective Rule-based Synchronous Scripting Domain-specific Visual Dataflow Imperative |
Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems.
..... Click the link for more information.
..... Click the link for more information.
A computer program is one or more instructions that are intended for execution by a computer. Specifically, it is a symbol or combination of symbols forming an algorithm that may or may not terminate, and that algorithm is written in a programming language.
..... Click the link for more information.
..... Click the link for more information.
In computer science, runtime or run time describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time).
..... Click the link for more information.
..... Click the link for more information.
In computer science, compile time refers to either the operations performed by a compiler (ie, compile-time operations) or programming language requirements that must be met by source code for it to be successfully compiled (ie, compile-time requirements).
..... Click the link for more information.
..... Click the link for more information.
Static has several meanings:
..... Click the link for more information.
- Static electricity, a net charge of an object
- The triboelectric effect, e.g. from shoes rubbing carpet
..... Click the link for more information.
Smalltalk
Paradigm: object-oriented
Appeared in: Development started in 1969
Publicly available in 1980
Designed by: Alan Kay, Dan Ingalls, Adele Goldberg
Developer: Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Scott Wallace, and Xerox PARC
..... Click the link for more information.
Paradigm: object-oriented
Appeared in: Development started in 1969
Publicly available in 1980
Designed by: Alan Kay, Dan Ingalls, Adele Goldberg
Developer: Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Scott Wallace, and Xerox PARC
..... Click the link for more information.
C
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language.
..... Click the link for more information.
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language.
..... Click the link for more information.
source code (commonly just source or code) is any sequence of statements and/or declarations written in some human-readable computer programming language.
..... Click the link for more information.
..... Click the link for more information.
compiler is a computer program (or set of programs) that translates text written in a computer language (the source language) into another computer language (the target language).
..... Click the link for more information.
..... Click the link for more information.
In computer science, a low-level programming language is a language that provides little or no abstraction from a computer's microprocessor. The word "low" does not imply that the language is inferior to high-level programming languages but rather refers to the small or nonexistent
..... Click the link for more information.
..... Click the link for more information.
Machine code or machine language is a system of instructions and data directly executed by a computer's central processing unit. Machine code is the lowest-level of abstraction for representing a computer program.
..... Click the link for more information.
..... Click the link for more information.
Metadata is data about data. An item of metadata may describe an individual datum, or content item, or a collection of data including multiple content items.
Metadata (sometimes written 'meta data') is used to facilitate the understanding, use and management of data.
..... Click the link for more information.
Metadata (sometimes written 'meta data') is used to facilitate the understanding, use and management of data.
..... Click the link for more information.
In computer science, runtime or run time describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time).
..... Click the link for more information.
..... Click the link for more information.
In computer science, compile time refers to either the operations performed by a compiler (ie, compile-time operations) or programming language requirements that must be met by source code for it to be successfully compiled (ie, compile-time requirements).
..... Click the link for more information.
..... Click the link for more information.
Lisp
Paradigm: multi-paradigm: functional, procedural, reflective
Appeared in: 1958
Designed by: John McCarthy
Developer: Steve Russell, Timothy P. Hart, and Mike Levin
Typing discipline: dynamic, strong
Dialects: Common Lisp, Scheme, Emacs Lisp
..... Click the link for more information.
Paradigm: multi-paradigm: functional, procedural, reflective
Appeared in: 1958
Designed by: John McCarthy
Developer: Steve Russell, Timothy P. Hart, and Mike Levin
Typing discipline: dynamic, strong
Dialects: Common Lisp, Scheme, Emacs Lisp
..... Click the link for more information.
Forth
Paradigm: Procedural, stack-oriented
Appeared in: 1970s
Designed by: Charles H. Moore
Typing discipline: typeless
Major implementations: Forth, Inc.
..... Click the link for more information.
Paradigm: Procedural, stack-oriented
Appeared in: 1970s
Designed by: Charles H. Moore
Typing discipline: typeless
Major implementations: Forth, Inc.
..... Click the link for more information.
Mumps virus
Mumps or epidemic parotitis is a viral disease of humans.
..... Click the link for more information.
For other uses of the word MUMPS, see .
Mumps or epidemic parotitis is a viral disease of humans.
..... Click the link for more information.
In computer programming an interpreted language is a programming language whose implementation often takes the form of an interpreter. Theoretically, any language may be compiled or interpreted, so this designation is applied purely because of common implementation practice and not
..... Click the link for more information.
..... Click the link for more information.
In computer science, imperative programming, as contrasted with declarative programming, is a programming paradigm that describes computation as statements that change a program state.
..... Click the link for more information.
..... Click the link for more information.
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data or that do part of the work during compile time that is otherwise done at run time.
..... Click the link for more information.
..... Click the link for more information.
This article or section may be confusing or unclear for some readers.
Please [improve the article] or discuss this issue on the talk page. This article has been tagged since December 2006.
..... Click the link for more information.
Please [improve the article] or discuss this issue on the talk page. This article has been tagged since December 2006.
..... Click the link for more information.
In computing, a first-class object (also value, entity, and citizen), in the context of a particular programming language, is an entity which can be used in programs without restriction (when compared to other kinds of objects in the same language).
..... Click the link for more information.
..... Click the link for more information.
string is an ordered sequence of symbols. These symbols are chosen from a predetermined set.
In programming, when stored in memory each symbol is represented using a numeric value.
..... Click the link for more information.
In programming, when stored in memory each symbol is represented using a numeric value.
..... Click the link for more information.
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
..... Click the link for more information.
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
..... Click the link for more information.
Objective-C
Paradigm: reflective, object oriented
Appeared in: 1986
Designed by: Brad Cox and Tom Love
Developer: Apple Inc.
Typing discipline: duck, static, weak
Major implementations: gcc, Apple
Influenced by: Smalltalk, C
..... Click the link for more information.
Paradigm: reflective, object oriented
Appeared in: 1986
Designed by: Brad Cox and Tom Love
Developer: Apple Inc.
Typing discipline: duck, static, weak
Major implementations: gcc, Apple
Influenced by: Smalltalk, C
..... Click the link for more information.
A selector can be:
..... Click the link for more information.
- a Reggae DJ (who selects music to play).
- a DNA probe used in the selector-technique (used in molecular diagnostics)
- a switch used to choose which function a device will perform
..... Click the link for more information.
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard X3.226-1994. Developed to standardize the divergent variants of Lisp which predated it, it is not an implementation but rather a language specification.
..... Click the link for more information.
..... Click the link for more information.
A program transformation is any operation that takes a program and generates another program. It is often important that the derived program be semantically equivalent to the original, relative to a particular formal semantics.
..... Click the link for more information.
..... Click the link for more information.
Java
Paradigm: Object-oriented, structured, imperative
Appeared in: 1995
Designed by: Sun Microsystems
Typing discipline: Static, strong, safe, nominative
Major implementations: Numerous
Influenced by: Objective-C, C++, Smalltalk, Eiffel,[1]
..... Click the link for more information.
Paradigm: Object-oriented, structured, imperative
Appeared in: 1995
Designed by: Sun Microsystems
Typing discipline: Static, strong, safe, nominative
Major implementations: Numerous
Influenced by: Objective-C, C++, Smalltalk, Eiffel,[1]
..... Click the link for more information.
A Java package is a mechanism for organizing Java classes into namespaces. Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time.
..... Click the link for more information.
..... Click the link for more information.
This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus