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.
Added support for global and local attributes
Objects implemented
See the Object documentation for more information
Case expression allows match without parenthesis
Now a match expression can appear in a case without surrounding it in parenthesis:
switch Expr {
case CaseExpr=Var {
Var
}
}
Creation of records with all default values
Now a record can be created without specifying any attribute value:
Person = person[,]
Changed in record syntax to get an attribute Public is not a keyword but a local attribute
Improved error handling and printing
A large number of errors now provide a human readable message in the compiler and interactive shell
Show nice error message when a tab is found in ifene source
When a tab character is found in a ifene source a error message informs the fact instead of a syntax error
Output option added to the compiler: -t mod
Allows to see the ast generated for the complete module
Improved pretty printing
efene to ifene and ifene to efene conversion now produces better code
Output option -t erl2ast now works for complete modules
The option now allows to convert complete erlang modules to ast, including preprocessor directives
Allow to compile more than one file
Multiple files can be passed to the compiler, it will compile them in the same execution reducing the time to start and stop the runtime
Removed almost all the conflicts in the parser
Only 4 shift/reduce conflicts left
Improved the project structure
Added lib, doc, ebin and test directories
Tests efene ast generation
Tests to compare that the ast generated by efene is identical to the one generated by erlang
l
Helpers to use the arrow expression with lists
d
Helpers to use the arrow expression with dicts
rest
Module to expose REST APIs, see helloweb and the rest module documentation for more information
obj
Functions to do common operations on objects like json serialization/deserialization, transformation to dict like data structures and more.
See the obj module documentation for more information
mongomapper
Object <-> mongodb mapped using emongo
See the mongomapper module documentation for more information
mod
Functions to do operations on modules, mainly generating the documentation and getting module attributes.
See the mod module documentation for more information
validate
Validator functions to be used with obj.validate.
See the validate module documentation for more information
A simple example:
obj.validate(User,
[(username,
[(validate.string(), "username must be a string"),
(validate.string_larger_than(2), "username size must be at least 3 characters"),
(validate.match("^[a-z][a-zA-Z0-9_]+$"), "username must be alphanumeric and _ only")]),
(mail,
[(validate.mail(), "invalid mail format")]),
(password,
[(validate.string(), "password must be a string"),
(validate.string_larger_than(2), "password size must be at least 3 characters")])])
Update website and readme
The website and readme now offer more information and examples
Documentation
A website with documentation related to efene is available at http://marianoguerra.com.ar/efene/docs
Tutorial
A tutorial to start developing web applications in efene is under development at http://marianoguerra.com.ar/efene/tutorial/