Draft for a proposal of an Explicit Reference Syntax

Yes, the synthax forbids an assignement of the callback from AnotherThing

class AnotherThing {
    constructor(cb) {
      /* any except @ref forbidden */ = cb
   }
}

It ensure that the syntax prevent any memory race. If you want to get the referenced value to manipulate you need to introduce a specific keyword to copy the intrinsic value (eg.: ```copy &ref````, from Explicit Ownership syntax)

1 Like