Package: oop

Experimental runtime type system — RTTI, vtables, and dynamic casting in Go.

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

  • TypeInfo runtime type identification.
  • Vtable simulation for dynamic dispatch and method overriding.
  • Cast / As / AsPtr dynamic 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.