Comment on Write a program that makes 2 + 2 = 5Comments−whoopdedo12yLua: local debug = require "debug" -- in case 5.2 debug.setmetatable(1, {__tostring=function(n) return ("%g"):format(n+1) end}) print(2+2) Trying to make 2+2==5 evaluate as true is a lot harder. Although Lua lets you define a custom + operator, it's a fallback not an override.
Comments
Lua:
Trying to make 2+2==5 evaluate as true is a lot harder. Although Lua lets you define a custom + operator, it's a fallback not an override.