Skip to content

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
}
classPoint {
x:Number,
y:Numberconstructor(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 {
returnPoint(p1.x + p2.x, p1.y + p2.y);
}
func add2(v:Vec2) ->Integer {
this.x += v.x;
this.y += v.y;
return0;
}
func str() ->String {
return"("+this.x +", "+this.y +")";
}
operator+(p1:Point, p2:Point) {
returnPoint(p1.x + p2.x, p1.y + p2.y);
}
operator+(p1:Point, a:Number) {
returnPoint(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:

TopicDescription
🏁 Hello WorldYour first steps with GW.
💎 TypesExplore the core data types.
📦 VariableLearn about state management.
⚙️ FunctionDefine reusable logic.
🛣️ ConditionsLogic flow and branching.
🔁 LoopsMastering iterations.
🏗️ StructLightweight data structures.
🏛️ ClassAdvanced object-orientation.
📂 ImportsImport other files.

Native functions:

TopicDescription
IntroductionC++ functions directly bound to the interpreter.
🕛 TimeC++ implementations of "time" (timestamps, sleep) functions.
⌨️ Input/OutputC++ implementations of input/output functions.
🖥️ SystemC++ implementations of system (exec cmds, exit, ...) functions.
🌐 NetworkTCP/IP Socket implementation for networking.
📝 StringC++ implementations of string utilities functions.

Standard library:

TopicDescription
🕛 TimeTime and Date Standard Library: Time native functions application.
🖥️ OSOS Standard Library: System / OS native functions application.
📂 IOFile and Console Standard Library: IO native functions application.
📝 StringString Utilities & StringBuilder Standard Library.
🌐 HTTPHTTP Client & Basic Web Server implementation.

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

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages