Library evolution / Luau · TypeScript · Lua
Data Structures
Rebuilding the same idea in three languages is a useful way to discover what the idea actually is.
- Role
- Creator and maintainer
- Language
- Luau · TypeScript · Lua
- Focus
- algorithms · API design · Roblox
The project
The current collection provides tested data structures aimed at Roblox development: sorted arrays, LRU caching, priority queues, random selection, and simple and UTF-8 tries.
It is also the latest version of an idea I have revisited across Lua, TypeScript, and typed Luau. Each implementation had a different type system, standard library, and set of callers. Those constraints changed the shape of the API without changing the underlying problems.
The evolution
The Lua version established the practical set of structures. The TypeScript version explored stronger type contracts and broader utilities. The current Luau library brings those lessons back to the ecosystem where the work is most useful, with generated documentation and tests as part of the package.
Rewriting is not automatically improvement. Here, the sequence is useful because it records which parts survived each language and which were accidental features of an earlier implementation.
What it demonstrates
- Data-structure implementation across three language environments.
- API refinement through repeated real use.
- Testing and documentation for foundational code.
- Comfort revisiting old work instead of preserving it for sentimental reasons.