Skip to content

adamwych/vexlang

Repository files navigation

Vex

Vex is a programming language. It's similar to Rust, Swift or C++, but does not cause headaches.

License

Features

  • Statically typed.
  • Cross-platform, transpiled to C++.
  • First-class C interoperability.
  • Modern syntax inspired by Rust and Swift.
  • Explicit mutability.
  • ... and more in the works.

Getting started

Syntax

Take a look at this sample code to get a feel for the language.

struct Point {
    var x: Int;
    var y: Int;

    Point(x: Int, y: Int) {
        self.x = x;
        self.y = y;
    }
    
    func translate(x: Int, y: Int) {
        self.x += x;
        self.y += y;
    }
}

func main(): Int {
    var point: Point = Point(10, 20);
    point.translate(5, 5);
    
    // TODO: Make me more interesting...

    return 0;
}

As you can see, it's extremely basic, very similar to other popular languages and that's what makes it very easy to learn if you already know any other widely-used language.

Installing

Vex is under heavy development and there are no official releases yet.

Usage

Vex.CLI project outputs an executable called vex, you can run vex --help to see the list of available commands and what parameters they accept.

Compiling a Vex source file

vex build path/to/source.vex --output-type cpp

Building

Vex is written in C# and uses .NET Core 8.0. To build the CLI, simply clone the repository and run the following command:

dotnet publish Vex.CLI -c Release -o Build

You can then find the self-contained executable in the Build directory.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

The Vex programming language.

Topics

Resources

License

Stars

Watchers

Forks

Contributors