HN Top New Show Ask Jobs

settings

Theme

Hand Mode

Feed

Comment by gucci-on-fleek

Comment by gucci-on-fleek 5 hours ago

4 replies

View on Hacker News

What about Lua? The language is very minimal, memory safe, and has Pascal-like syntax just like Delphi.

ptx 4 hours ago

Lua's variables being global by default seems somewhat error-prone.

Reply View | 1 reply
  • gucci-on-fleek 4 hours ago

    Agreed, but the recently-released v5.5 fixes that [0], and it's fairly easy to fix this in older versions with the following snippet

      setmetatable(_G, { __newindex = false, __index = false })
    
    [0]: https://www.lua.org/manual/5.5/manual.html#2.2
    Reply View | 0 replies
andrewstuart 2 hours ago

verything is an off by one error in Lua.

Reply View | 1 reply
  • gucci-on-fleek 2 hours ago

    Or conversely, everything is an off-by-one error in every other language :)

    Reply View | 0 replies