Package: oop
An experimental framework that brings traditional OOP concepts to Go: runtime type information (RTTI), virtual method tables, dynamic casting, and class metadata — useful for plugin systems, language interop, and porting OOP-style code.
Repository: https://github.com/dracory/oop
Installation
go get github.com/dracory/oop
Features
TypeInforuntime type identification.- Vtable simulation for dynamic dispatch and method overriding.
Cast/As/AsPtrdynamic casting.ObjectFactory/ObjectWrapper— a friendlier API on top of the low-level primitives.- Nil-interface utilities (
NilInterface,IsNil).
Notes
- Relies on reflection and
unsafe— adds overhead vs. idiomatic Go. - Intended for niche use cases (complex hierarchies, plugin systems, interop) rather than everyday application code.