[ANN] efene 0.4 - a language for the erlang VM - released

Mariano Guerra <>
Sat Apr 10 23:35:58 CEST 2010


new release of efene.

efene is a programming language that runs on the erlang virtual machine.

the idea is to provide an alternative syntax to erlang that is most
suitable for people coming from languages like Java, C, C++, C#,
Javascript.

the language is almost 100% compatible with erlang (and will be), the
compiler allows to translate an efene source file into a readable
erlang one or compile it directly to bytecode. It also adds some
syntactic sugar in some places to make some tasks easier.

changes

    * if statement syntax modifies to look more C/C++ like


if Num == 1 {
    io.format("is one~n")
} else if Num == 2 {
    io.format("is two~n")
} else {
    io.format("not one not two~n")
}

    * case statement syntax modifies to look more C/C++ like


switch random.uniform(4) {
    case 1:
        io.format("one!~n")
        break
    case 2:
        io.format("two!~n")
        break
    case 3:
        io.format("three!~n")
        break
    else:
        io.format("else~n")
        break
}

    * try/catch statement syntax modifies to look more C++ like


try {
    make_error(Arg)
} catch throw 1 {
    io.format("throw 1~n")
} catch exit 2 {
    io.format("exit 2~n")
} catch error (some fancy tuple 3) {
    io.format("error~n")
} else {
    io.format("else~n")
}

    * record syntax supported


# create record instance
R = person[firstname="Bob" lastname="Esponja" mail=""]
# modify record
R1 = person.R[firstname="Mariano" lastname="Guerra"]
# access record attribute
person.R.firstname

# record pattern matching
is_bob = fn (person[firstname="Bob"]) {
    true
} (_) {
    false
}

for a complete reference see the LanguageReference:
http://wiki.github.com/marianoguerra/efene/languagereference

Participate

a mailing list is available at librelist just send a mail to
 to subscribe.


More information about the erlang-questions mailing list