E (programming language)

From Bauman National Library
This page was last modified on 8 June 2016, at 20:58.
Paradigm multi-paradigm: object-oriented, message passing
Designed by Mark S. Miller
Typing discipline strong, dynamic
OS Cross-platform
License portions in different [[Free software licence|free licenses]]
Website erights.org
Major implementations
E-on-Java, E-on-CL

E — object-oriented programming language designed for secure distributed programming.


E was created by Mark Miller (Mark S. Miller), Dan Bernstein (Dan Bornstein), and a group of employees of Electric Communities in 1997. He is descended from a language for parallel computing and Joule Original-E, Java extensions for distributed computing. E conceived as a scripting language, sacrificing efficiency for the sake of ease of use.


The basis of language is ELib - library that provides the interaction of objects and program streams. Each object exists in a certain process. Distributed computing realized by sending messages to remote objects (objects owned by other processes). TO E there are two ways to send messages - immediate call (analogue of the usual function call in the other languages ​​- the calling process waits until the called) and a held call. The second kind of sends a message to the recipient and the sender creates a temporary object- "promise." The sender can continue to work immediately using the object. Later, when the receiver processes the message and returns a result object takes the value of the promise of this result. This mechanism avoids deadlocks and reduce delays caused by network delays.

The language is designed to ensure the best possible safety. In particular, it contributes to the strict adherence to the object-oriented model based on the protection mandate (mandate of the object is a link to it). All communication is encrypted between the processes at the level of language. The syntax of the language is also designed to simplify security audit: limiting the scope of variables, == for equality and: = to assign a value (no bewildering operator =), etc.

Syntax resembles Java, with the difference that all programs consist only of expressions. The basic data types - int, float, string, char and boolean; int type supports long arithmetic.

Syntax elements

Note to the end of the line #
Assigning a value to a variable <varname> := <value>
Equality ==
Inequality  !=
The cycle with the precondition while (condtion) ...
Cycle for - next to the range of integers with an increment of 1 for i in 1..10 { ... }


Hello, World!:

Example for versions of E-on-Java 0.9.3

println("Hello, World!")

Fibonacci numbers:

Example for versions of E-on-Java 0.9.3

var s := [0, 1]
var res := ""
for _ in 1..16 {
  def [a, b] := s
  s := [b, a + b]
  res := res + b.toString(10) + ", "
println(res + "...")


Example for versions of E-on-Java 0.9.3

E - implicitly typed language; : int, specified in the signature features - no type declaration, and the restriction (guard) - the contract that the factorial function will only work with integer arguments and return only integer values. These restrictions are not necessary, but useful for auditing security code.

def factorial(n :int) :int {
  if (n == 0) {
    return 1
  } else {
    return n * factorial(n-1)

for n in 0..16 {
  println(n.toString(10) + "! = " + factorial(n).toString(10))


Official Website E