Skip to content
/ GW Public

Interpreted object-oriented programming language made in C++

Notifications You must be signed in to change notification settings

Program132/GW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

122 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GW Programming Language


🚀 Unleash the Power of GW

GW is an object-oriented programming language crafted to be the ultimate developer's tool. By distilling the power of C++, the elegance of Python, the safety of Java, and the modern feel of Kotlin, GW offers a coding experience that is both remarkably powerful and refreshingly simple.

Currently an high-performance interpreted language, GW is evolving towards native transpilation, promising the speed of compiled languages with the ease of modern syntax.


⚡ Quick Peek

See how clean object-oriented programming can be in GW:

struct Vec2 {
    x: Number,
    y: Number
}

class Point {
    x: Number,
    y: Number

    constructor(x: Number, y: Number) {
        this.x = x;
        this.y = y;
    }

    constructor(x: Number) {
        this.x = x;
        this.y = x;
    }

    func add(p1: Point, p2: Point) -> Point {
        return Point(p1.x + p2.x, p1.y + p2.y);
    }

    func add2(v: Vec2) -> Integer {
        this.x += v.x;
        this.y += v.y;
        return 0;
    }

    func str() -> String {
        return "(" + this.x + ", " + this.y + ")";
    }

    operator +(p1: Point, p2: Point) {
        return Point(p1.x + p2.x, p1.y + p2.y);
    }

    operator +(p1: Point, a: Number) {
        return Point(p1.x + a, p1.y + a);
    }
}

var p = Point(1, 2);
var p2 = Point(3, 4);
var p3 = p2.add(p, p2);

println(p3.str());

var v = Vec2(5, 5);
p2.add2(v);
println(p2.str());

var p4 = p + p2;
println(p4.str());

var p5 = p + 5;
println(p5.str());

📚 Documentation

Dive into the details and start building with GW:

Topic Description
🏁 Hello World Your first steps with GW.
💎 Types Explore the core data types.
📦 Variable Learn about state management.
⚙️ Function Define reusable logic.
🛣️ Conditions Logic flow and branching.
🔁 Loops Mastering iterations.
🏗️ Struct Lightweight data structures.
🏛️ Class Advanced object-orientation.

Compile & Run

Windows:

git clone https://github.com/Program132/GW.git
cd GW
.\build.bat

Linux:

git clone https://github.com/Program132/GW.git
cd GW
chmod +x build.sh
./build.sh

Run (Debug or Release):

./build/debug/GW.exe
./build/release/GW.exe

Developed with ❤️ by Program

About

Interpreted object-oriented programming language made in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages