I've always felt that pointer equality was the right 'least authority'
that could be ascribed to a pointer, and convienent for building
capability systems (although I don't tend to work on actors/futures
I sort of feel that implicit dereference without a proof of
inhabitance was more problematic. I tend to like where pointer_eq is
`Ref<S> -> Ref<T> -> bool` so you can compare pointers to different
and `deref: Inhabited<T> -> Ref<T> -> T`. (or perhaps just
`InhabitedRef<T> -> T`) Allowing one to have instances of `Ref<⊥>` the
reference type inhabited which cannot be dereferenced without type
conversion + aforementioned proof.
I tend to view it as a useful primitive, (then again I don't tend to
work with futures/actors), ocaml has it, rust has it, sml as far as I
know does not. Perhaps it has been discussed in Successor ML though
I'd be surprised if it was accepted due to referential transparency as
mentioned by Tony. But at the same time I recognize that this may well
be an unpopular opinion. At the same time I view it as a right since
as Dale says above being able to differentiate references is a right
where the inability to differentiate references should be equivalent
to a unitary value.
I'd imagine I would argue faced with Dale's situation with 'yes', and
'maybe', that similar to the way I perceive the ability to have
references which are not dereferencable. I'd rather also have
references which are dereferencable but not equatable.
I.e. treat set/deref/eq each as their own facet. I don't see how it
could be harmful if the rights associated with references are fine
grained and not imposed. The larger hurdle I imagine would be
convincing someone such a system would be worthwhile!