lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Ravi ( is a dialect of Lua 5.3 with LLVM based JIT
compiler and limited optional static typing.

I am pleased to announce that the alpha 0.13 release of Ravi is now
available. (Note that this is a source only release; binaries will be
uploaded in the next day or two).

The principal change in this release is the addition of type assertion
operators to the language. A type assertion operator behaves like a
unary operator. It is introduced by the '@' symbol, after which a
supported type must be given followed by the expression whose type is
being asserted. The result of the expression then becomes of the
asserted type. Example:

  local t = { 1,2,3 }
  local i: integer = @integer( t[1] )

Without the type assertion operator '@integer' above the compiler
would not allow the assignment of 't[1]' to the variable 'i'.

The type assertion operators do nothing if an expression is already
known to be of the required type. If the variable is not known to be
of the required type then special bytecodes are generated that perform
run-time checks on the expression's type; an error is thrown if the
type check fails.

Additional information is available at:

For full details please see: