Dylan (programming language)
Dylan (Dynamic Language) is a programming language that was initiated in the early 1990s by a group led by Apple and specified.
The aim was to
- To combine the best aspects of Lisp and Smalltalk
- To provide users with static programming an attractive, dynamic alternative
- To be usable on small machines
- To offer high dynamics during prototyping and during the development
- Provide tools that provide commercial performance in production code.
Dylan was originally designed for use on Apple's Newton PDA, but there was probably prestige replaced from time and by Newton scripts, one based on the programming language Self Self Development Apple.
- 2.1 Gwydion Dylan
- 2.2 Apple Dylan / Harlequin Dylan / Functional Developer / Open Dylan
- 2.3 Mindy
Demarcation from other programming languages
Dylan's object-oriented paradigm in the tradition of Common Lisp and differs from most object-oriented programming languages ( such as C , Java, Python, Ruby ) in the abstraction principle of polymorphism, which is implemented differently in both cases.
Programming languages such as Java encapsulate data into objects, such as a class fraction, containing the numerator and denominator. Operations that work with these objects, such as the addition, also be seen as a property of the object / class and managed in the class itself.
Such as the following pseudo- code snippet shows both data and methods (operations) of the object part.
A fracture; a.nenner = 10; a.zaehler = 1; Fraction b; b.nenner = 1; b.zaehler = 5; a.addiere (b); With virtual methods, this approach enables polymorphism. This means that an object 's operations " brings self " and the programmer does not have to specify at runtime, such as an adder for different objects to be executed.
If you have defined, for example, two classes break and Complex number, both of which have the parent class number, the amount a method ( ), the magnitude of a complex number or a break with a.betrag () can be calculated without the need to distinguish the source code if it is changed by a fraction or a complex number at a.
This approach promises a level of abstraction, because a well -implemented class the programmer significantly reduces work. An object "knows" best themselves how to calculate its amount.
The disadvantage of this approach is that you must now stuck in a class operations which can not accurately assign an object. The addition of two numbers A and B is such a case. Meets A B now A.addiere (B) or B.addiere (A).
Dylan sets the polymorphism at in a different way. Operations and methods are defined outside the class, instead of A.addiere (B ) occurs now will add (A, B). Within the class only describes data fields and distributed access rights.
With minor deviations in the calculation of the Class Precedence List Dylans multiple dispatch is an exact acquisition of multi-methods of Common Lisp.
Define method will add (a
Define method rechteck_umfang ( length, width ) = > ( extensive ) 2 * (add ( len width) ) end; It should be noted that the classes for the len parameter, width are not set. In performing the calculation of the correct implementation will add is retrieved automatically. This is called multiple dispatch and corresponds to the tradition of object-oriented programming languages in the Lisp family, such as in Common Lisp with the Common Lisp Object System CLOS.
Gwydion Dylan, named after a magician from a Welsh legend, was originally developed at Carnegie Mellon University. It is a compiler that generates C code. This code must be compiled using a C compiler into machine code. This can run on many platforms Gwydion Dylan programs. However, the implementation is less complete than Open Dylan.
After Apple 1998, the development of Dylan finally stopped, the source code was handed over to the English company Harlequin. Harlequin was acquired shortly thereafter by Global Graphics and the development of Harlequin Dylan into an independent company, Functional Objects ( also " FUNO " ), spun off. The Dylan implementation with IDE was henceforth sold under the name " Functional Developer ". 2004 Functional Developer was finally handed over to the Gwydian Dylan maintainer as an open source project ( FUNO put his business in early 2006 a completely ). The software is called Open since Dylan and is available in version 2011.1 since 10 December 2011.
In addition to an interactive shell (similar to Ruby's IRB or BeanShell ), the IDE provides an object browser with the state of running programs can be analyzed. Both tools can be applied to both local as well as on other computers running Dylan programs.
The IDE is currently only available on Windows, the compiler is now running but also on Mac OS X and Linux.
Mindy is a Dylan interpreter, whose development has been discontinued now. It was used to compile the first version of Gwydion compiler. The name is a recursive acronym for MINDY Is Not Dylan Yet.