Date: Sat, 8 Feb 2025 15:49:36 +0000
On Sat, 8 Feb 2025, 14:37 Sebastian Wittmeier, <wittmeier_at_[hidden]>
wrote:
> 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.
>
Yes, I know, I was agreeing with you. Other people have said that other
languages don't have it, and you showed cases that still have pointers and
dereferencing. It was a useful piece of information, thank you.
>
> -----Ursprüngliche Nachricht-----
> *Von:* Jonathan Wakely <cxx_at_[hidden]>
> *Gesendet:* Sa 08.02.2025 14:34
> *Betreff:* Re: [std-proposals] Possible deprecation of -> operator
> *An:* std-proposals_at_[hidden];
> *CC:* Sebastian Wittmeier <wittmeier_at_[hidden]>;
>
>
> On Sat, 8 Feb 2025 at 13:22, Sebastian Wittmeier via Std-Proposals <
> std-proposals_at_[hidden]> 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!
>
>
wrote:
> 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.
>
Yes, I know, I was agreeing with you. Other people have said that other
languages don't have it, and you showed cases that still have pointers and
dereferencing. It was a useful piece of information, thank you.
>
> -----Ursprüngliche Nachricht-----
> *Von:* Jonathan Wakely <cxx_at_[hidden]>
> *Gesendet:* Sa 08.02.2025 14:34
> *Betreff:* Re: [std-proposals] Possible deprecation of -> operator
> *An:* std-proposals_at_[hidden];
> *CC:* Sebastian Wittmeier <wittmeier_at_[hidden]>;
>
>
> On Sat, 8 Feb 2025 at 13:22, Sebastian Wittmeier via Std-Proposals <
> std-proposals_at_[hidden]> 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!
>
>
Received on 2025-02-08 15:49:54