lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Nov 10, 2020 at 2:38 AM Ką Mykolas <> wrote:
> On Mon, Nov 9, 2020 at 7:22 PM Ranier Vilela <> wrote:
> > I never see any platform that NULL is not all-zeroes representation.
> Well, Antonin mentioned obscure machines, but check out this LLVM
> thread [1] about non-zero NULL on AMD GCN (OpenCL system).
> In terms of time, it is not as old and obscure, just... behaves
> differently on different address spaces.
> [1]

Also, there is another argument to that, from the engineering perspective,
address 0 do sound like perfectly valid address, pointing exactly at
the the beginning of available memory slab.
Thus, thinking of 0 as de facto NULL value, does not make much sense,
because NULL should not be dereferencable.

On that analogy, could You imagine nil being 0? :}