-- models.g.nupp: type syntax, gradual checks
local function scale(point, factor)
return {x = point.x * factor, y = point.y * factor}
end
-- models.nupp: the same code, now a checked boundary
local function scale(point: Point, factor: number): Point
return new Point {x = point.x * factor, y = point.y * factor}
endAdd types without leaving Lua behind
Start with a LuaJIT program that already runs. Add annotations where they earn their keep, then tighten a file to strict Nupp when it is ready.
