It was not an argument for getting rid of ->, but that some known young languages still have explicit dereferencing to distinguish between pointer and pointee when accessing.
 

-----Ursprüngliche Nachricht-----
Von: Jonathan Wakely <cxx@kayari.org>
Gesendet: Sa 08.02.2025 14:34
Betreff: Re: [std-proposals] Possible deprecation of -> operator
An: std-proposals@lists.isocpp.org;
CC: Sebastian Wittmeier <wittmeier@projectalpha.org>;
 

On Sat, 8 Feb 2025 at 13:22, Sebastian Wittmeier via Std-Proposals <std-proposals@lists.isocpp.org> wrote:

Go and Rust use * for dereferencing.

 

https://go.dev/tour/moretypes/1

 
Even though there is no pointer arithmetic, and therefore no chance of misunderstanding what `p + 2` means, it looks like you still need to say `*p + 2`, i.e. no implicit dereferencing of pointers to act on the pointee.
 


https://doc.rust-lang.org/book/appendix-02-operators.html

 

Rust uses (*p). to access members of pointed to objects in unsafe mode.

 
Again, no implicit dereferencing. It looks like you need to use `(*p).i` rather than just `p.i` to access a member through a pointer.
 
So while it's true that they don't have -> for dereferencing pointers, they are not arguments in favour of using . to dereference pointers. You could use them as arguments for getting rid of -> because we can just do `(*p).i` instead, but I don't think anybody wants that!