Reflect

Classes

Classes are a feature implemented as part of the language runtime. A class definition gets lowered to a struct that exhibits the same interface as the class definition and implements the ABI underlying the specific type of class.

⚠️ TODO

❌ Not Implemented

Example

extern(C++)
class MyClass {
	private {
		int _number;
	}

	this(int num)
	{
		_number = num;
	}

	method foo() { print(num); }
}

function main()
{
	var c = new(MyClass, 42);
	c.foo();
}