March 02, 2016 Re: C++ UFCS update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Sunday, 21 February 2016 at 10:16:19 UTC, Jonathan M Davis wrote:
> As for a pipe operator, I expect that it wouldn't really help any. It would be a lot like . vs -> in that it's an unnecessary complication, but it would actually probably be worse. If |
I am not sure I agree with this. "->" will make it *visible* what is going on, while "." can mean many things, and I would have to investigate what .something in part of a chain does. Right?
|
March 02, 2016 Re: C++ UFCS update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dejan Lekic | On Wednesday, 2 March 2016 at 13:29:03 UTC, Dejan Lekic wrote:
> I am not sure I agree with this. "->" will make it *visible* what is going on, while "." can mean many things, and I would have to investigate what .something in part of a chain does. Right?
Are you sure that "->" is obvious in C++? I ask because it can mean many things, not mentioning it can be overloaded!
Piotrek
|
March 02, 2016 Re: C++ UFCS update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Piotrek | On Wednesday, 2 March 2016 at 15:57:41 UTC, Piotrek wrote:
> Are you sure that "->" is obvious in C++? I ask because it can mean many things, not mentioning it can be overloaded!
That's an odd statement. In C++ it is a member-overload that returns a pointer which is hardwired to be dereferenced by the compiler.
No real relation...
Anyway, trying to prevent library authors from providing the means to express an algebra is the antithesis of a programming language for generic programming.
This is an area where D is fighting against itself and should either improve or focus less on generic programming. D2 is being held back by the high level legacy it inherits from D1.
|
March 02, 2016 Re: C++ UFCS update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Piotrek | On Wednesday, 2 March 2016 at 15:57:41 UTC, Piotrek wrote:
> On Wednesday, 2 March 2016 at 13:29:03 UTC, Dejan Lekic wrote:
>> I am not sure I agree with this. "->" will make it *visible* what is going on, while "." can mean many things, and I would have to investigate what .something in part of a chain does. Right?
>
> Are you sure that "->" is obvious in C++? I ask because it can mean many things, not mentioning it can be overloaded!
>
> Piotrek
Especially since its overloading rules are different from regular overload rules.
|
March 07, 2016 Re: C++ UFCS update | ||||
---|---|---|---|---|
| ||||
Posted in reply to Piotrek | On Wednesday, 2 March 2016 at 15:57:41 UTC, Piotrek wrote:
> On Wednesday, 2 March 2016 at 13:29:03 UTC, Dejan Lekic wrote:
>> I am not sure I agree with this. "->" will make it *visible* what is going on, while "." can mean many things, and I would have to investigate what .something in part of a chain does. Right?
>
> Are you sure that "->" is obvious in C++? I ask because it can mean many things, not mentioning it can be overloaded!
>
> Piotrek
Who is talking about C++?? `->` I was talking about is completely different thing from what `->` in C++. It would/should be semantically different from `.` in D and `->` in C++.
|
Copyright © 1999-2021 by the D Language Foundation