[M3devel] language question -- locals uninitialized or zero?

Rodney Bates rodney_bates at lcwb.coop
Mon Feb 25 18:08:12 CET 2013



-Rodney Bates

--- lemming at henning-thielemann.de wrote:

From: Henning Thielemann <lemming at henning-thielemann.de>
To: Antony Hosking <antony.hosking at gmail.com>
Cc: m3devel <m3devel at elegosoft.com>
Subject: Re: [M3devel] language question -- locals uninitialized or zero?
Date: Sun, 24 Feb 2013 10:22:08 +0100 (CET)


On Sun, 24 Feb 2013, Antony Hosking wrote:

> I suppose it could, but that would be a space leak.The current implementation sets it to NIL.

I believe that the question was, whether he can rely on the pointer being 
NIL, and I think he cannot.

Yes, he cannot, strictly by the language rules.  Somewhat pragmatically, it seems
a real stretch to imagine why an implementer would choose anything other than NIL,
for any reference type.  Even more pragmatically, I am quite sure we have no variant
of the compiler that uses anything other than NIL.  But to have code that is guaranteed
to survive any future new implementation, give it an explicit :=NIL.





More information about the M3devel mailing list