Category:Elena: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{language|Elena |
{{language|Elena |
||
|exec=bytecode |
|exec=bytecode |
||
|strength=strong |
|||
|site=http://sourceforge.net/projects/elenalang/ |
|||
|safety=safe |
|||
⚫ | |||
|express=implicit |
|||
|parampass=reference |
|||
|checking=dynamic |
|checking=dynamic |
||
⚫ | |||
|typing=Checking/Dynamic |
|||
|LCT=yes}} |
|LCT=yes}} |
||
{{language programming paradigm|Object-oriented}}{{language programming paradigm|dynamic}} |
{{language programming paradigm|Object-oriented}}{{language programming paradigm|dynamic}} |
Revision as of 01:10, 27 December 2010
![Language](http://static.miraheze.org/rosettacodewiki/thumb/2/27/Rcode-button-language-crushed.png/64px-Rcode-button-language-crushed.png)
This programming language may be used to instruct a computer to perform a task.
Execution method: | Compiled (bytecode) |
---|---|
Garbage collected: | Yes |
Type safety: | Safe |
Type strength: | Strong |
Type expression: | Implicit |
Type checking: | Dynamic |
See Also: |
Overview
ELENA is a general-purpose, object-oriented, polymorphic language with late binding. It features multiple dispatching, context-dependent roles, dynamic inheritance and group object support.
The language treats any program as a set of objects (class instances). The program flow is a process of interaction between objects by sending each other messages. A message may have attached information (a message parameter). An object may react on message if it has an appropriate message handler (a method). If the object reacts on the message it is treated as successful otherwise unsuccessful. In its turn the method may send messages to other objects and so on until the flow reaches the method written by external tools (meta method). If the message is unsuccessful the flow is considered to be broken. It's possible to declare alternative flow which are executed if previous ones are broken. The method has only one input parameter and one output parameter (the method may return itself).
Every object may be formed up with other objects characterizing its internal state. They in turn may be formed with others and so on until meta objects which internal states are considered as raw data.
All referring entities in the language are objects. A variable is a reference to the object allocated in the program heap. The literal and numeric constants are references to the objects allocated in the static memory.
Object model
Any object is an instance of one or another class. The classes form the hierarchy tree on the principle of inheritance. There is the common super class - Object. The class parent may be explicitly declared. When the parent is not specified, the class inherits Object.
A class is an abstract concept which means that no operations can be done with it except a declaration. So to create the object its symbol should be referenced. There are explicit and implicit, static and dynamic symbols.
When a new class is declared simultaneously the appropriate explicit symbol is declared as well. The implicit symbol should be declared implicitly. In general the explicit symbol is the object in the initial state and the explicit one is the object in the particular state.
A static symbol is the class instance which state is preserved. A static symbol is always implicit one. There could be only one instance of static symbol.
The class declaration can be named or unnamed (inline declaration) public or private (when the class name is a private name). Its body contains member declarations: fields, roles and methods.
The fields can be accessed only within the class and its descendants. They can be a normal ones (references to another objects) or meta ones (raw data).
The roles are alternative sets of methods which could be used to implement context-dependant object behavior. When it is applied the role overrides the appropriate object methods with its own ones (static mutation).
Methods maybe private or public depending on their name (public or private). All class methods are considered to be polymorphic. It is possible to dispatch the method call depending on its parameter (declarative multi-dispatching). The method has only one input (or nil) and output (or it should return itself) parameters. If the method requires several parameters a special proxy argument list object can be used.
It is possible to declare a special "Any" handler. It is a method which redirects any unhandled message (i.e. messages which are not mapped in the class or its base classes) to the specified target. The target could be a single object (actually mutation) or collection (group object). A group object is a collection of the objects accessible through the common instance reference. The content of the group can be changed dynamically during the object life time (self-modification). The member objects can be a part of different groups or be single. The group can be persistent or temporally created to solve the particular task. The group objects are treated like "normal" ones and no special routines are required to work with them. If two or more members have duplicate methods either the first message mapping is resolved (exclusive mode) or all duplicate methods are executed (broadcast mode) depending on the group type.
Subcategories
This category has the following 3 subcategories, out of 3 total.
@
- Elena examples needing attention (empty)
- Elena Implementations (1 P)
- Elena User (2 P)
Pages in category "Elena"
The following 200 pages are in this category, out of 241 total.
(previous page) (next page)2
A
- A+B
- ABC problem
- Abstract type
- Abundant, deficient and perfect number classifications
- Accumulator factory
- Ackermann function
- Add a variable to a class instance at runtime
- AKS test for primes
- Amb
- Amicable pairs
- Anagrams
- Anonymous recursion
- Apply a callback to an array
- Arithmetic evaluation
- Arithmetic/Integer
- Array concatenation
- Array length
- Arrays
- Associative array/Creation
- Associative array/Iteration
- Averages/Arithmetic mean
- Averages/Median
- Averages/Mode
- Averages/Root mean square
- Averages/Simple moving average
B
C
- Caesar cipher
- Calendar - for "REAL" programmers
- Call a function
- Call an object method
- Case-sensitivity of identifiers
- Catamorphism
- Character codes
- Check that file exists
- Classes
- Closures/Value capture
- Collections
- Combinations
- Command-line arguments
- Comments
- Compare a list of strings
- Compound data type
- Conway's Game of Life
- Copy a string
- Create a file
- Create a two-dimensional array at runtime
D
E
F
G
H
I
J
L
M
P
R
- Random number generator (included)
- Random numbers
- Read a file line by line
- Real constants and functions
- Reflection/List methods
- Reflection/List properties
- Remove duplicate elements
- Repeat a string
- Respond to an unknown method call
- Return multiple values
- Reverse a string
- Reverse words in a string
- Roman numerals/Decode
- Roman numerals/Encode
- Rot-13
- Run-length encoding
- Runtime evaluation
- Runtime evaluation/In an environment
S
- Search a list
- Search a list of records
- Send an unknown method call
- Sequence of primes by trial division
- Set of real numbers
- Short-circuit evaluation
- Simple windowed application
- Singleton
- Singly-linked list/Element definition
- Singly-linked list/Element insertion
- Singly-linked list/Traversal
- Sleep
- Sockets
- Sort an array of composite structures
- Sort an integer array
- Sort disjoint sublist
- Sort three variables
- Sort using a custom comparator
- Sorting algorithms/Bogosort
- Sorting algorithms/Bubble sort
- Sorting algorithms/Cocktail sort
- Sorting algorithms/Comb sort
- Sorting algorithms/Counting sort
- Sorting algorithms/Gnome sort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Pancake sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Selection sort
- Sorting algorithms/Sleep sort
- Sorting algorithms/Stooge sort
- Stack
- Stack traces
- String append
- String case
- String comparison
- String concatenation
- String interpolation (included)
- String length
- String matching
- String prepend
- Strip a set of characters from a string
- Strip whitespace from a string/Top and tail
- Substring
- Substring/Top and tail