On Wednesday, 27 September 2017 at 21:01:36 UTC, Jesse Phillips
wrote:
On Wednesday, 27 September 2017 at 16:35:54 UTC, DreadKyller
wrote:
My question is about overloading, several operators can be
overloaded in D, one of the ones that can't apparently is the
address of operator (&object). My question is have I simply
missed it or does it actually not exist, and if it's not
overloadable, is there any reason why this was decided?
Because there's been numerous times that it'd be useful to me,
just recently with how much I use the operator because of
OpenGL I decided to ask.
My answer is that & is a defined operation on all addressable
memory. Unlike other operators which don't exist until you
"overload" them.
Yes but the dereference operator can be overloaded. The reasoning
doesn't stand, unless that's recognized as an inconsistency.