Jump to page: 1 2
Thread overview
Operator overloading
Nov 05, 2003
Matthias Becker
Nov 05, 2003
Ant
Nov 05, 2003
Charles Sanders
Nov 05, 2003
Ant
Nov 06, 2003
Charles Sanders
Nov 06, 2003
Elias Martenson
Nov 05, 2003
Walter
Nov 05, 2003
Matthias Spycher
Nov 06, 2003
Charles Sanders
Nov 06, 2003
Walter
Nov 06, 2003
Sean L. Palmer
Nov 06, 2003
Matthew Wilson
Nov 06, 2003
Charles Sanders
Nov 06, 2003
Walter
Re: Operator overloading (and breaking code)
Nov 06, 2003
Luna Kid
Nov 06, 2003
Matthew Wilson
November 05, 2003
I'm sure this was discussed before, but I haven't been on this group for a long time. So could somebody explain me, why names are used instead of the C++ like operator foo? To me it's much more intuitiv to write "operator +=" instead of "addass".


November 05, 2003
In article <bob3sq$2n8p$1@digitaldaemon.com>, Matthias Becker says...
>
>I'm sure this was discussed before, but I haven't been on this group for a long time. So could somebody explain me, why names are used instead of the C++ like operator foo? To me it's much more intuitiv to write "operator +=" instead of "addass".
>
>

I have the same question.

Ant


November 05, 2003
I agree on this one also, just some ideas but if not operator foo something like

__+=__ () { }
__++__ () { }

A little pythonesque ?

C

"Ant" <Ant_member@pathlink.com> wrote in message news:bob4r4$2oo1$1@digitaldaemon.com...
> In article <bob3sq$2n8p$1@digitaldaemon.com>, Matthias Becker says...
> >
> >I'm sure this was discussed before, but I haven't been on this group for
a long
> >time. So could somebody explain me, why names are used instead of the C++
like
> >operator foo? To me it's much more intuitiv to write "operator +="
instead of
> >"addass".
> >
> >
>
> I have the same question.
>
> Ant
>
>


November 05, 2003
"Matthias Becker" <Matthias_member@pathlink.com> wrote in message
news:bob3sq$2n8p$1@digitaldaemon.com...
| I'm sure this was discussed before, but I haven't been on this group for a
long
| time. So could somebody explain me, why names are used instead of the C++
like
| operator foo? To me it's much more intuitiv to write "operator +=" instead
of
| "addass".
|
|

Over a year ago (about june-august 2002) there was a votation about this, and that was the winning convention.

—————————————————————————
Carlos Santander
"Matthias Becker" <Matthias_member@pathlink.com> wrote in message
news:bob3sq$2n8p$1@digitaldaemon.com...
| I'm sure this was discussed before, but I haven't been on this group for a
long
| time. So could somebody explain me, why names are used instead of the C++
like
| operator foo? To me it's much more intuitiv to write "operator +=" instead
of
| "addass".
|
|

Over a year ago (about june-august 2002) there was a votation about this, and that was the winning convention.

————————————————————————— Carlos Santander


November 05, 2003
In article <bobc3l$2rt$1@digitaldaemon.com>, Charles Sanders says...
>
>I agree on this one also, just some ideas but if not operator foo something like
>
>__+=__ () { }
>__++__ () { }
>
>A little pythonesque ?
>

I think I like it.
(never though I would say that about "_")

Can we do:
alias addass __+=__;
or someting like that?


Ant


November 05, 2003
"Matthias Becker" <Matthias_member@pathlink.com> wrote in message news:bob3sq$2n8p$1@digitaldaemon.com...
> I'm sure this was discussed before, but I haven't been on this group for a
long
> time. So could somebody explain me, why names are used instead of the C++
like
> operator foo? To me it's much more intuitiv to write "operator +=" instead
of
> "addass".

The reason is because of the ability to write the reverse operator overloads, and to make the overloads easilly greppable.



November 05, 2003
I've been lurking here for a year or more, enjoying the fact that this project is progressing steadily. Keep up the good work, Walter and everyone else.

As for operator overloading, I like the naming convention, but I think all names should be prefixed with op, as in opCall to make it clear we are dealing with operators. Names like add are actually quite common, e.g. in collection classes.

Matthias


In article <bobi49$cde$1@digitaldaemon.com>, Walter says...
>
>
>"Matthias Becker" <Matthias_member@pathlink.com> wrote in message news:bob3sq$2n8p$1@digitaldaemon.com...
>> I'm sure this was discussed before, but I haven't been on this group for a
>long
>> time. So could somebody explain me, why names are used instead of the C++
>like
>> operator foo? To me it's much more intuitiv to write "operator +=" instead
>of
>> "addass".
>
>The reason is because of the ability to write the reverse operator overloads, and to make the overloads easilly greppable.
>
>
>


November 06, 2003
This sounds good ( prefixing with op ), I just dont like the word ass
everywhere in my code.

C

"Matthias Spycher" <matthias@coware.com> wrote in message news:bobmno$jge$1@digitaldaemon.com...
> I've been lurking here for a year or more, enjoying the fact that this
project
> is progressing steadily. Keep up the good work, Walter and everyone else.
>
> As for operator overloading, I like the naming convention, but I think all
names
> should be prefixed with op, as in opCall to make it clear we are dealing
with
> operators. Names like add are actually quite common, e.g. in collection
classes.
>
> Matthias
>
>
> In article <bobi49$cde$1@digitaldaemon.com>, Walter says...
> >
> >
> >"Matthias Becker" <Matthias_member@pathlink.com> wrote in message news:bob3sq$2n8p$1@digitaldaemon.com...
> >> I'm sure this was discussed before, but I haven't been on this group
for a
> >long
> >> time. So could somebody explain me, why names are used instead of the
C++
> >like
> >> operator foo? To me it's much more intuitiv to write "operator +="
instead
> >of
> >> "addass".
> >
> >The reason is because of the ability to write the reverse operator overloads, and to make the overloads easilly greppable.
> >
> >
> >
>
>


November 06, 2003
Good thinking, the alias doesnt like operators though :(.

C

"Ant" <Ant_member@pathlink.com> wrote in message news:bobdkv$56l$1@digitaldaemon.com...
> In article <bobc3l$2rt$1@digitaldaemon.com>, Charles Sanders says...
> >
> >I agree on this one also, just some ideas but if not operator foo
something
> >like
> >
> >__+=__ () { }
> >__++__ () { }
> >
> >A little pythonesque ?
> >
>
> I think I like it.
> (never though I would say that about "_")
>
> Can we do:
> alias addass __+=__;
> or someting like that?
>
>
> Ant
>
>


November 06, 2003
"Matthias Spycher" <matthias@coware.com> wrote in message news:bobmno$jge$1@digitaldaemon.com...
> I've been lurking here for a year or more, enjoying the fact that this
project
> is progressing steadily. Keep up the good work, Walter and everyone else.

Thanks!

> As for operator overloading, I like the naming convention, but I think all
names
> should be prefixed with op, as in opCall to make it clear we are dealing
with
> operators. Names like add are actually quite common, e.g. in collection
classes.

You're right, I've been intending to do this, but I hate upsetting existing code.


« First   ‹ Prev
1 2