News for hackers. Stuff that matters.
Re:When nil is not nil by elpocko on Monday October 10, 2022 @05:27PM (#33156572)
A null pointer is a boxed value in LuaJIT, therefore not nil. But it is equal to nil when compared with nil.

    local x = require('ffi').cast('void*', nil)
    if x and x == nil then
        print("x is truthy and nil at the same time")
    end

There are no comments on this comment yet.