by DixieDev · 3y ago · 0 comments
That's true but I think the bigger motivation is avoiding ambiguity than seeing when an indirection is happening. (You also can't see whether a method is virtual, i.e. indirecting via the vtable, from the call site.) In C++ references don't have any standalone methods or operators so there's no ambiguity from using methods via a reference just using a dot.
To the extent that this is a problem, it's a problem with references as a language feature in general, not with the arrow syntax.