<div dir="auto">I think the biggest problems would be<div dir="auto">1. How do you mark a memory location as allocated (has identity aka memory address)</div><div dir="auto">but should still be treated as null which changes later without any notice. </div><div dir="auto">It's like a reverse WeakReference</div><div dir="auto">2. How would you represent it syntactically it's neither null nor a valid object it's a in between state previously unknown.</div><div dir="auto">3. There would be many changes in the language necessary to make this feature work reliably and the use beyond niece things like circular references in immutable datastructures are probably low. </div><div dir="auto">4. This would also bring up many questions in which cases the memory behaves like a object and in which case null. Like synchronization, null checks, instanceof, etc.</div><div dir="auto"><br></div><div dir="auto">It's likely not worth the complexity and the cost. </div><div dir="auto"><br></div><div dir="auto">Great regards </div><div dir="auto">RedIODev </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 4, 2023, 15:47 David Alayachew <<a href="mailto:davidalayachew@gmail.com">davidalayachew@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:monospace" class="gmail_default"><br>Hello Amber Dev Team,<br><br>I am starting this thread to start a spin off discussion from the "Question about circular references" thread above.<br><br>In short, RedIODev mentioned something in passing that piqued my interest. The idea was the ability to reference a declared, but uninitialized variable (a reference), and allowing that reference to be passed to, let's say, another constructor, but not permitting derereference until the variable in question has fully been initialized.<br><br>I wanted to get people's perspectives on this. Is this a good idea? A bad one? Is this too difficult to do? Not that difficult? Please let me know your thoughts.<br><br>Thank you for your time and insight!<br>David Alayachew<br></div></div>
</blockquote></div>