Skip to content

Instantly share code, notes, and snippets.

@BigZaphod
BigZaphod / struct.lua
Last active July 6, 2017 01:27
A read only struct value type for Lua
--[[
An immutable structure-like value type for Lua.
Sean Heber (sean@fifthace.com)
BSD License
July, 2017
Written on an iPad using Codea (https://codea.io)
I’m pretty new to Lua, but I kept running into situations where I wanted to use a complex value type
such as a Point as a key in a table. Unfortunately since each table instance is unique, using a table