New Issue: 'weakPointer': how should the type be represented in the language?

20956, "jeremiah-corrado", "'weakPointer': how should the type be represented in the language?", "2022-11-02T13:51:48Z"

The prototype implementation for weakPointer, implements the pointer as a generic record type:

record weakPointer {
type t
...
}

which is defined a submodule of sharedObject. This type can be imported and used as follows:

use WeakPointer;
// or import WeakPointer.weakPointer;

var myShared = new shared someClassType();

var my_weak = new weakPointer(myShared);

This approach is similar to Rust's weak and C++'s weak_ptr; however it differs from the other memory management strategies in the language because they are implemented using keywords rather than exposed types.