On Wednesday, 12 October 2016 at 23:14:26 UTC, Jonathan M Davis
opIndexUnary, opIndexAssign, and opIndexOpAssign exist to make
it possible to do some basic operations on the result of
foo[bar] without having to have opIndex return by ref, but
assuming that you can return by ref, all of them could be done
by having opIndex return by ref.
No? If I want to mimics opIndex* by having opIndex return a ref.
I would need to create a new entry every time opIndex is used to
access a non-existent key, whether the return value is used as a
lvalue or not. And opIndex* will solve this problem.