Jump to content

Category:Elena: Difference between revisions

Line 20:
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.
 
== Namespaces ==
--
 
Any ELENA program or library consists of modules (files with .NL extension) containing
Line 33 ⟶ 32:
(the new module namespace consists of the root one plus the folder relative path)
 
== Messaging ==
--
 
As in the most of dynamic object-oriented languages the main way to interact with objects in ELENA is sending a message. Unlike others the message name is structured and consists of a verb, a signature and a parameter counter. The verb defines a message action, for example read or write some data. There are only limited set of possible verbs (e.g. eval[uate], add, set, get, run, seek and so on). In general the signature is user defined and describes the message parameters. It can be used to define some custom
Line 68 ⟶ 66:
 
 
== Classes, Roles and Symbols ==
--
 
ELENA is an object-oriented language, so to create a program we have to declare new classes.
Line 127 ⟶ 124:
#static SingletonClass = DerivedClass new &field:0 &field:0.
 
== Code blocks ==
--
 
ELENA code block consists of a sequence of statements. The block is enclosed in square brackets and may contain nested sub code blocks (which in fact are inline action classes). The statement terminator is a dot.
Line 168 ⟶ 164:
 
 
== Conditional branching ==
 
--
ELENA like Smalltalk does not support any special language constructs to implement the conditional branching. Instead special Boolean symbols (system’true and system’false) are used. All conditional operations should return these symbols as a result.
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.