# kikito/middleclass

Object-orientation for Lua

Repository: https://github.com/kikito/middleclass
Canonical: https://ross.abutalabs.com/products/middleclass
Homepage: https://github.com/kikito/middleclass
Language: Lua
License: MIT
License Family: permissive
Last push: 2025-11-03T12:54:01+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 50, release rhythm 35, longevity 100
- inputs: {"age_days": 5978, "days_push": 303, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1919, forks 196 (observed 2026-08-28T04:05:54.908099+00:00)

## What it is
Middleclass is a lightweight object-orientation library for Lua providing classes, inheritance, metamethods, class variables, and mixin support in a single file. It is widely used in Lua game development and scripting.

## Use cases
- add classes and inheritance to lua code
- object-oriented programming in lua
- lua class library with mixins
- define classes with constructors in lua
- operator overloading via metamethods in lua
- oop for love2d or game scripting

## When to choose
- you want a small, dependency-free, single-file OOP solution for Lua
- you need inheritance, class variables, and mixins with a simple API
- you are writing games or scripts in Lua and want familiar class semantics

## When to avoid
- you need multiple inheritance or advanced type checking
- you are using Lua 5.4+ and prefer native or alternative OOP mechanisms
- your project requires a full-featured class system with strict typing

## Facets
- artifact type: library
- maturity: stable
- function: programming-language, developer-tools
- domain: programming-languages, developer-tools
- platform: lua, cross-platform
- tags: oop, class-system, inheritance, mixins, metamethods, single-file-library, game-development

## Member repositories
- kikito/middleclass (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:54.908099+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:09:58.529481+00:00, confidence not recorded.
  - readme: https://github.com/kikito/middleclass (fetched 2026-08-28T04:05:54.908099+00:00, sha 8a28b8002268)
  - homepage: https://github.com/kikito/middleclass (fetched 2026-08-29T10:49:14.770181+00:00, sha 712d9cd33a77)
- Data as of 2026-08-30T08:39:29.467469+00:00.
