January 29, 2004 Re: operators Re: Template argument deduction, template member functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | The current system is too complicated, because it's being abused to do things it's not designed to do. If all operators were global (not class) scope, all these problems would go away. Added would be: We would have to make our own reverse operators. No big deal. Usually almost the same as the normal one. Operators could not be virtual. No big deal, just forward to a virtual class member function if that's what you need. Can anyone think of any other drawbacks to making operators be non-class-members? Other than it is effort which keeps Walter from doing other things? If we get to D 1.0 with it like it is now, it will never be changed and we'll all be perpetually unhappy about it. Sean "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:bvbgpb$2e2p$1@digitaldaemon.com... > It would mean significant changes in the language. I would vote it stays as it currently is. Just that bug has to be fixed, which doesn't search for a reverse (right operand) operator overload if a non-matching direct (left operand) overload exists. > > -eye |
January 29, 2004 Re: Template argument deduction, template member functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | > Philosophically, I don't believe that this is what arithmetic operator overloads should be used for.
if you really want philosophical arguments, you simply know you're wrong. they don't belong to a type. they belong to two types. so you should not force them to be bound to one type. thats just plain wrong.
philosophically, that is.
:D
|
January 29, 2004 Re: operators Re: Template argument deduction, template member functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:bvbk18$2j9e$1@digitaldaemon.com... > The current system is too complicated, because it's being abused to do things it's not designed to do. If all operators were global (not class) scope, all these problems would go away. Added would be: > > We would have to make our own reverse operators. No big deal. Usually almost the same as the normal one. > > Operators could not be virtual. No big deal, just forward to a virtual class member function if that's what you need. > > Can anyone think of any other drawbacks to making operators be non-class-members? Other than it is effort which keeps Walter from doing other things? > > If we get to D 1.0 with it like it is now, it will never be changed and we'll all be perpetually unhappy about it. Agree totally > > Sean > > "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:bvbgpb$2e2p$1@digitaldaemon.com... > > It would mean significant changes in the language. I would vote it stays as it currently is. Just that bug has to be fixed, which doesn't search for a reverse (right operand) operator overload if a non-matching direct (left operand) overload exists. > > > > -eye > > |
Copyright © 1999-2021 by the D Language Foundation