Skip to content
marianoguerra edited this page Sep 13, 2010 · 1 revision

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="[email protected]"]
# 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

Participate

a mailing list is available at librelist just send a mail to [email protected] to subscribe.

as first mail you may send a hello world program in efene and present yourself by saying your name, where you are, how did you heard about efene and anything else you would like to say.

Clone this wiki locally