/elalang

a small inconsequent programming language

Primary LanguageC++Apache License 2.0Apache-2.0

Ela

Requirements.

to build, you need

  • premake to generate project files alternatively, you could just use the already generate gnu-make-Makefile which is published in this repo.

TODO.

  • Type Inference for Variable Definitions
  • Array Literals -> check types
  • Static Array type: var x : [int,4]; (shorthand form for var x : array[int,4];)
  • become more functional, by adding a Function type

Design.

Import-statements.

import-statements currently have to appear in the beginning of the file. This makes the program easier to read, and also avoids any debate about when to put imported symbols into scope, i.e.:

func main( args : list[string]) -> int {
    print("hallo welt");

}
func testFunc() {
    // is this function in scope?
    // even if it is, the reader may not know where it comes from,
    // or how it is imported, because they have not seen the import-statement
    someFuncFromTestModule();
}
import "testModule"

Statements and Expressions.

Expressions work as they normally would in most c-style languages. unlike java, for example, we do allow expression statements