Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Overloading operators

16 posts in Objects Last posting was on 2002-09-12 17:42:55.0Z
Joshua Ruppert Posted on 2002-09-11 19:08:28.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <rupe_j@hotmail.com>
From: "Joshua Ruppert" <rupe_j@hotmail.com>
Subject: Overloading operators
Date: Wed, 11 Sep 2002 15:08:28 -0400
Lines: 6
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_xhsh5dcWCHA.300@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:295
Article PK: 712870

Is there any way now, or any plan in the future to allow for overloading
operators within objects?

Josh


Roy Kiesler [TeamSybase] Posted on 2002-09-11 20:19:07.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
Subject: Re: Overloading operators
Date: Wed, 11 Sep 2002 16:19:07 -0400
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host131.percussion.com 208.252.62.131
Message-ID: <364_j7OkpJdWCHA.324@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:294
Article PK: 712866

No. What exactly do you have in mind?

--
<hopethishelps/>
Roy Kiesler [TeamSybase]
Sybase Developer Network -- http://sdn.sybase.com

"Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
news:xhsh5dcWCHA.300@forums.sybase.com...
> Is there any way now, or any plan in the future to allow for overloading
> operators within objects?
>
> Josh
>
>


Joshua Ruppert Posted on 2002-09-11 20:43:45.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <rupe_j@hotmail.com>
From: "Joshua Ruppert" <rupe_j@hotmail.com>
Subject: Re: Overloading operators
Date: Wed, 11 Sep 2002 16:43:45 -0400
Lines: 30
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_k9m8ITdWCHA.74@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:293
Article PK: 712868

I just thought it would be nice to be able to compare two instances of the
same object. Otherwise it really just makes for prettier code to beable to
overload the "=" for Set and Get methods for object properties. To be honest
it has been a while since I have played with this (I've been pretty much
strickly using PB for the last four years) and I'm not even sure if you can
do the second within C++.

Josh

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:j7OkpJdWCHA.324@forums.sybase.com...
> No. What exactly do you have in mind?
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network -- http://sdn.sybase.com
>
> "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> news:xhsh5dcWCHA.300@forums.sybase.com...
> > Is there any way now, or any plan in the future to allow for overloading
> > operators within objects?
> >
> > Josh
> >
> >
>
>


Roy Kiesler [TeamSybase] Posted on 2002-09-11 21:26:19.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
Subject: Re: Overloading operators
Date: Wed, 11 Sep 2002 17:26:19 -0400
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host131.percussion.com 208.252.62.131
Message-ID: <364_1N0yNvdWCHA.74@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:292
Article PK: 712863

We've discussed this topic in the futures forum a while back -- there was
sort of a concensus that a Java-like equals() method would better address
the comparison aspect of objects. FWIW, you can implement this today in a
semi-generic way (using ClassDefinition).

As far as Get/Set methods "masked" by an "=" operator, I personally think
this sends the wrong message to the programmer using your class, i.e.,
"don't use get/set methods -- assign values directly)

--
<hopethishelps/>
Roy Kiesler [TeamSybase]
Sybase Developer Network -- http://sdn.sybase.com

"Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
news:k9m8ITdWCHA.74@forums.sybase.com...
> I just thought it would be nice to be able to compare two instances of the
> same object. Otherwise it really just makes for prettier code to beable to
> overload the "=" for Set and Get methods for object properties. To be
honest
> it has been a while since I have played with this (I've been pretty much
> strickly using PB for the last four years) and I'm not even sure if you
can
> do the second within C++.
>
> Josh
>
> "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
> message news:j7OkpJdWCHA.324@forums.sybase.com...
> > No. What exactly do you have in mind?
> >
> > --
> > <hopethishelps/>
> > Roy Kiesler [TeamSybase]
> > Sybase Developer Network -- http://sdn.sybase.com
> >
> > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > Is there any way now, or any plan in the future to allow for
overloading
> > > operators within objects?
> > >
> > > Josh
> > >
> > >
> >
> >
>
>


Joshua Ruppert Posted on 2002-09-12 15:04:57.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
From: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 11:04:57 -0400
Lines: 61
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_A$aye6mWCHA.300@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:284
Article PK: 712858

What exactly did you mean here (in regards to the ClassDefinition object)?
Can I find an example anywhere?

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:1N0yNvdWCHA.74@forums.sybase.com...
> We've discussed this topic in the futures forum a while back -- there was
> sort of a concensus that a Java-like equals() method would better address
> the comparison aspect of objects. FWIW, you can implement this today in a
> semi-generic way (using ClassDefinition).
>
> As far as Get/Set methods "masked" by an "=" operator, I personally think
> this sends the wrong message to the programmer using your class, i.e.,
> "don't use get/set methods -- assign values directly)
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network -- http://sdn.sybase.com
>
> "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> news:k9m8ITdWCHA.74@forums.sybase.com...
> > I just thought it would be nice to be able to compare two instances of
the
> > same object. Otherwise it really just makes for prettier code to beable
to
> > overload the "=" for Set and Get methods for object properties. To be
> honest
> > it has been a while since I have played with this (I've been pretty much
> > strickly using PB for the last four years) and I'm not even sure if you
> can
> > do the second within C++.
> >
> > Josh
> >
> > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote
in
> > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > No. What exactly do you have in mind?
> > >
> > > --
> > > <hopethishelps/>
> > > Roy Kiesler [TeamSybase]
> > > Sybase Developer Network -- http://sdn.sybase.com
> > >
> > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > Is there any way now, or any plan in the future to allow for
> overloading
> > > > operators within objects?
> > > >
> > > > Josh
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Roy Kiesler [TeamSybase] Posted on 2002-09-12 17:08:10.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 13:08:10 -0400
Lines: 97
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host131.percussion.com 208.252.62.131
Message-ID: <364_nPuEqDoWCHA.311@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com> <364_A$aye6mWCHA.300@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:282
Article PK: 712853

You can have an ancestor NVO called say, n_base, that implements an equals()
method that takes an n_base as a parameter (read-only), and returns a
boolean.

The method itself would first do a straight comparison using the "="
operator to determine the object is not compared with itself (some smart-a$$
programmer will always try this, you know<g>)

Next, the method would call FindClassDefinition on both the current object
(this) and the object passed as a parameter. The class definition object
will enumerate all instance variables, scripts etc. You can then perform a
member-to-member comparison to determine equality of the two objects.

Naturally, if an object has other objects (rather then simple data types) as
instance variables, the function can be called recursively on those instance
variables.

See where I'm going with this?

--
<hopethishelps/>
Roy Kiesler [TeamSybase]
Sybase Developer Network -- http://sdn.sybase.com

"Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com> wrote in message
news:A$aye6mWCHA.300@forums.sybase.com...
> What exactly did you mean here (in regards to the ClassDefinition object)?
> Can I find an example anywhere?
>
> "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
> message news:1N0yNvdWCHA.74@forums.sybase.com...
> > We've discussed this topic in the futures forum a while back -- there
was
> > sort of a concensus that a Java-like equals() method would better
address
> > the comparison aspect of objects. FWIW, you can implement this today in
a
> > semi-generic way (using ClassDefinition).
> >
> > As far as Get/Set methods "masked" by an "=" operator, I personally
think
> > this sends the wrong message to the programmer using your class, i.e.,
> > "don't use get/set methods -- assign values directly)
> >
> > --
> > <hopethishelps/>
> > Roy Kiesler [TeamSybase]
> > Sybase Developer Network -- http://sdn.sybase.com
> >
> > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > news:k9m8ITdWCHA.74@forums.sybase.com...
> > > I just thought it would be nice to be able to compare two instances of
> the
> > > same object. Otherwise it really just makes for prettier code to
beable
> to
> > > overload the "=" for Set and Get methods for object properties. To be
> > honest
> > > it has been a while since I have played with this (I've been pretty
much
> > > strickly using PB for the last four years) and I'm not even sure if
you
> > can
> > > do the second within C++.
> > >
> > > Josh
> > >
> > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
wrote
> in
> > > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > > No. What exactly do you have in mind?
> > > >
> > > > --
> > > > <hopethishelps/>
> > > > Roy Kiesler [TeamSybase]
> > > > Sybase Developer Network -- http://sdn.sybase.com
> > > >
> > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > > Is there any way now, or any plan in the future to allow for
> > overloading
> > > > > operators within objects?
> > > > >
> > > > > Josh
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Joshua Ruppert Posted on 2002-09-12 17:42:55.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
From: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 13:42:55 -0400
Lines: 114
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_aScmwSoWCHA.300@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com> <364_A$aye6mWCHA.300@forums.sybase.com> <364_nPuEqDoWCHA.311@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:280
Article PK: 712859

Ya, I see where this is going, that's pretty cool. I've never paid any
attention to that object before there might be some structural validation
uses for it.

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:nPuEqDoWCHA.311@forums.sybase.com...
> You can have an ancestor NVO called say, n_base, that implements an
equals()
> method that takes an n_base as a parameter (read-only), and returns a
> boolean.
>
> The method itself would first do a straight comparison using the "="
> operator to determine the object is not compared with itself (some
smart-a$$
> programmer will always try this, you know<g>)
>
> Next, the method would call FindClassDefinition on both the current object
> (this) and the object passed as a parameter. The class definition object
> will enumerate all instance variables, scripts etc. You can then perform a
> member-to-member comparison to determine equality of the two objects.
>
> Naturally, if an object has other objects (rather then simple data types)
as
> instance variables, the function can be called recursively on those
instance
> variables.
>
> See where I'm going with this?
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network -- http://sdn.sybase.com
>
> "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com> wrote in message
> news:A$aye6mWCHA.300@forums.sybase.com...
> > What exactly did you mean here (in regards to the ClassDefinition
object)?
> > Can I find an example anywhere?
> >
> > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote
in
> > message news:1N0yNvdWCHA.74@forums.sybase.com...
> > > We've discussed this topic in the futures forum a while back -- there
> was
> > > sort of a concensus that a Java-like equals() method would better
> address
> > > the comparison aspect of objects. FWIW, you can implement this today
in
> a
> > > semi-generic way (using ClassDefinition).
> > >
> > > As far as Get/Set methods "masked" by an "=" operator, I personally
> think
> > > this sends the wrong message to the programmer using your class, i.e.,
> > > "don't use get/set methods -- assign values directly)
> > >
> > > --
> > > <hopethishelps/>
> > > Roy Kiesler [TeamSybase]
> > > Sybase Developer Network -- http://sdn.sybase.com
> > >
> > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > news:k9m8ITdWCHA.74@forums.sybase.com...
> > > > I just thought it would be nice to be able to compare two instances
of
> > the
> > > > same object. Otherwise it really just makes for prettier code to
> beable
> > to
> > > > overload the "=" for Set and Get methods for object properties. To
be
> > > honest
> > > > it has been a while since I have played with this (I've been pretty
> much
> > > > strickly using PB for the last four years) and I'm not even sure if
> you
> > > can
> > > > do the second within C++.
> > > >
> > > > Josh
> > > >
> > > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
> wrote
> > in
> > > > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > > > No. What exactly do you have in mind?
> > > > >
> > > > > --
> > > > > <hopethishelps/>
> > > > > Roy Kiesler [TeamSybase]
> > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > >
> > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > > > Is there any way now, or any plan in the future to allow for
> > > overloading
> > > > > > operators within objects?
> > > > > >
> > > > > > Josh
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Joshua Ruppert Posted on 2002-09-11 22:35:16.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <rupe_j@hotmail.com>
From: "Joshua Ruppert" <rupe_j@hotmail.com>
Subject: Re: Overloading operators
Date: Wed, 11 Sep 2002 18:35:16 -0400
Lines: 67
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_XuINdReWCHA.311@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:290
Article PK: 712867

As for the masking of the "=" I take it for granted that when I'm dealing
with objects functionality like that has been implemented. That's (in my
mind) one of the main purposes of an object, that is to be able to filter
the data and especially trigger other events. I think that it's poor
implementation to allow direct access to properties and with that in mind
implementing the masking just makes the code look a little cleaner.

Josh

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:1N0yNvdWCHA.74@forums.sybase.com...
> We've discussed this topic in the futures forum a while back -- there was
> sort of a concensus that a Java-like equals() method would better address
> the comparison aspect of objects. FWIW, you can implement this today in a
> semi-generic way (using ClassDefinition).
>
> As far as Get/Set methods "masked" by an "=" operator, I personally think
> this sends the wrong message to the programmer using your class, i.e.,
> "don't use get/set methods -- assign values directly)
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network -- http://sdn.sybase.com
>
> "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> news:k9m8ITdWCHA.74@forums.sybase.com...
> > I just thought it would be nice to be able to compare two instances of
the
> > same object. Otherwise it really just makes for prettier code to beable
to
> > overload the "=" for Set and Get methods for object properties. To be
> honest
> > it has been a while since I have played with this (I've been pretty much
> > strickly using PB for the last four years) and I'm not even sure if you
> can
> > do the second within C++.
> >
> > Josh
> >
> > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote
in
> > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > No. What exactly do you have in mind?
> > >
> > > --
> > > <hopethishelps/>
> > > Roy Kiesler [TeamSybase]
> > > Sybase Developer Network -- http://sdn.sybase.com
> > >
> > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > Is there any way now, or any plan in the future to allow for
> overloading
> > > > operators within objects?
> > > >
> > > > Josh
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Joshua Ruppert Posted on 2002-09-11 22:23:04.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <rupe_j@hotmail.com>
From: "Joshua Ruppert" <rupe_j@hotmail.com>
Subject: Re: Overloading operators
Date: Wed, 11 Sep 2002 18:23:04 -0400
Lines: 62
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_GTA2oKeWCHA.161@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:291
Article PK: 712869

What do you gain by using the equals() method?

Josh

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:1N0yNvdWCHA.74@forums.sybase.com...
> We've discussed this topic in the futures forum a while back -- there was
> sort of a concensus that a Java-like equals() method would better address
> the comparison aspect of objects. FWIW, you can implement this today in a
> semi-generic way (using ClassDefinition).
>
> As far as Get/Set methods "masked" by an "=" operator, I personally think
> this sends the wrong message to the programmer using your class, i.e.,
> "don't use get/set methods -- assign values directly)
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network -- http://sdn.sybase.com
>
> "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> news:k9m8ITdWCHA.74@forums.sybase.com...
> > I just thought it would be nice to be able to compare two instances of
the
> > same object. Otherwise it really just makes for prettier code to beable
to
> > overload the "=" for Set and Get methods for object properties. To be
> honest
> > it has been a while since I have played with this (I've been pretty much
> > strickly using PB for the last four years) and I'm not even sure if you
> can
> > do the second within C++.
> >
> > Josh
> >
> > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote
in
> > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > No. What exactly do you have in mind?
> > >
> > > --
> > > <hopethishelps/>
> > > Roy Kiesler [TeamSybase]
> > > Sybase Developer Network -- http://sdn.sybase.com
> > >
> > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > Is there any way now, or any plan in the future to allow for
> overloading
> > > > operators within objects?
> > > >
> > > > Josh
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Roy Kiesler [TeamSybase] Posted on 2002-09-12 13:29:11.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 09:29:11 -0400
Lines: 84
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host131.percussion.com 208.252.62.131
Message-ID: <364_rRcNSJmWCHA.161@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com> <364_GTA2oKeWCHA.161@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:289
Article PK: 712865

"cleaner" object-oriented approach? I happen to like C++ a lot, but operator
overloading is something I rarely use. In the case where I need to compare
two objects value-wise (as opposed to reference-wise), I prefer Java's
equals() to C++'s "=".

--
<hopethishelps/>
Roy Kiesler [TeamSybase]
Sybase Developer Network -- http://sdn.sybase.com

"Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
news:GTA2oKeWCHA.161@forums.sybase.com...
> What do you gain by using the equals() method?
>
> Josh
>
> "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
> message news:1N0yNvdWCHA.74@forums.sybase.com...
> > We've discussed this topic in the futures forum a while back -- there
was
> > sort of a concensus that a Java-like equals() method would better
address
> > the comparison aspect of objects. FWIW, you can implement this today in
a
> > semi-generic way (using ClassDefinition).
> >
> > As far as Get/Set methods "masked" by an "=" operator, I personally
think
> > this sends the wrong message to the programmer using your class, i.e.,
> > "don't use get/set methods -- assign values directly)
> >
> > --
> > <hopethishelps/>
> > Roy Kiesler [TeamSybase]
> > Sybase Developer Network -- http://sdn.sybase.com
> >
> > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > news:k9m8ITdWCHA.74@forums.sybase.com...
> > > I just thought it would be nice to be able to compare two instances of
> the
> > > same object. Otherwise it really just makes for prettier code to
beable
> to
> > > overload the "=" for Set and Get methods for object properties. To be
> > honest
> > > it has been a while since I have played with this (I've been pretty
much
> > > strickly using PB for the last four years) and I'm not even sure if
you
> > can
> > > do the second within C++.
> > >
> > > Josh
> > >
> > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
wrote
> in
> > > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > > No. What exactly do you have in mind?
> > > >
> > > > --
> > > > <hopethishelps/>
> > > > Roy Kiesler [TeamSybase]
> > > > Sybase Developer Network -- http://sdn.sybase.com
> > > >
> > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > > Is there any way now, or any plan in the future to allow for
> > overloading
> > > > > operators within objects?
> > > > >
> > > > > Josh
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Joshua Ruppert Posted on 2002-09-12 14:09:09.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
From: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 10:09:09 -0400
Lines: 97
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_N4PgTbmWCHA.311@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com> <364_GTA2oKeWCHA.161@forums.sybase.com> <364_rRcNSJmWCHA.161@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:287
Article PK: 712862

It's visually cleaner based on my previously stated 'purpose' (obviously not
the only purpose, but an important one) of OO programming and stance against
direct property access.

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:rRcNSJmWCHA.161@forums.sybase.com...
> "cleaner" object-oriented approach? I happen to like C++ a lot, but
operator
> overloading is something I rarely use. In the case where I need to compare
> two objects value-wise (as opposed to reference-wise), I prefer Java's
> equals() to C++'s "=".
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network -- http://sdn.sybase.com
>
> "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> news:GTA2oKeWCHA.161@forums.sybase.com...
> > What do you gain by using the equals() method?
> >
> > Josh
> >
> > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote
in
> > message news:1N0yNvdWCHA.74@forums.sybase.com...
> > > We've discussed this topic in the futures forum a while back -- there
> was
> > > sort of a concensus that a Java-like equals() method would better
> address
> > > the comparison aspect of objects. FWIW, you can implement this today
in
> a
> > > semi-generic way (using ClassDefinition).
> > >
> > > As far as Get/Set methods "masked" by an "=" operator, I personally
> think
> > > this sends the wrong message to the programmer using your class, i.e.,
> > > "don't use get/set methods -- assign values directly)
> > >
> > > --
> > > <hopethishelps/>
> > > Roy Kiesler [TeamSybase]
> > > Sybase Developer Network -- http://sdn.sybase.com
> > >
> > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > news:k9m8ITdWCHA.74@forums.sybase.com...
> > > > I just thought it would be nice to be able to compare two instances
of
> > the
> > > > same object. Otherwise it really just makes for prettier code to
> beable
> > to
> > > > overload the "=" for Set and Get methods for object properties. To
be
> > > honest
> > > > it has been a while since I have played with this (I've been pretty
> much
> > > > strickly using PB for the last four years) and I'm not even sure if
> you
> > > can
> > > > do the second within C++.
> > > >
> > > > Josh
> > > >
> > > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
> wrote
> > in
> > > > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > > > No. What exactly do you have in mind?
> > > > >
> > > > > --
> > > > > <hopethishelps/>
> > > > > Roy Kiesler [TeamSybase]
> > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > >
> > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > > > Is there any way now, or any plan in the future to allow for
> > > overloading
> > > > > > operators within objects?
> > > > > >
> > > > > > Josh
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Roy Kiesler [TeamSybase] Posted on 2002-09-12 14:44:49.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 10:44:49 -0400
Lines: 117
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host131.percussion.com 208.252.62.131
Message-ID: <364_u9c2jzmWCHA.300@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com> <364_GTA2oKeWCHA.161@forums.sybase.com> <364_rRcNSJmWCHA.161@forums.sybase.com> <364_N4PgTbmWCHA.311@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:286
Article PK: 712856

I agree -- that was my answer to your "what do you gain" question.

--
<hopethishelps/>
Roy Kiesler [TeamSybase]
Sybase Developer Network -- http://sdn.sybase.com

"Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com> wrote in message
news:N4PgTbmWCHA.311@forums.sybase.com...
> It's visually cleaner based on my previously stated 'purpose' (obviously
not
> the only purpose, but an important one) of OO programming and stance
against
> direct property access.
>
> "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
> message news:rRcNSJmWCHA.161@forums.sybase.com...
> > "cleaner" object-oriented approach? I happen to like C++ a lot, but
> operator
> > overloading is something I rarely use. In the case where I need to
compare
> > two objects value-wise (as opposed to reference-wise), I prefer Java's
> > equals() to C++'s "=".
> >
> > --
> > <hopethishelps/>
> > Roy Kiesler [TeamSybase]
> > Sybase Developer Network -- http://sdn.sybase.com
> >
> > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > news:GTA2oKeWCHA.161@forums.sybase.com...
> > > What do you gain by using the equals() method?
> > >
> > > Josh
> > >
> > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
wrote
> in
> > > message news:1N0yNvdWCHA.74@forums.sybase.com...
> > > > We've discussed this topic in the futures forum a while back --
there
> > was
> > > > sort of a concensus that a Java-like equals() method would better
> > address
> > > > the comparison aspect of objects. FWIW, you can implement this today
> in
> > a
> > > > semi-generic way (using ClassDefinition).
> > > >
> > > > As far as Get/Set methods "masked" by an "=" operator, I personally
> > think
> > > > this sends the wrong message to the programmer using your class,
i.e.,
> > > > "don't use get/set methods -- assign values directly)
> > > >
> > > > --
> > > > <hopethishelps/>
> > > > Roy Kiesler [TeamSybase]
> > > > Sybase Developer Network -- http://sdn.sybase.com
> > > >
> > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > news:k9m8ITdWCHA.74@forums.sybase.com...
> > > > > I just thought it would be nice to be able to compare two
instances
> of
> > > the
> > > > > same object. Otherwise it really just makes for prettier code to
> > beable
> > > to
> > > > > overload the "=" for Set and Get methods for object properties. To
> be
> > > > honest
> > > > > it has been a while since I have played with this (I've been
pretty
> > much
> > > > > strickly using PB for the last four years) and I'm not even sure
if
> > you
> > > > can
> > > > > do the second within C++.
> > > > >
> > > > > Josh
> > > > >
> > > > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
> > wrote
> > > in
> > > > > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > > > > No. What exactly do you have in mind?
> > > > > >
> > > > > > --
> > > > > > <hopethishelps/>
> > > > > > Roy Kiesler [TeamSybase]
> > > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > > >
> > > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > > > > Is there any way now, or any plan in the future to allow for
> > > > overloading
> > > > > > > operators within objects?
> > > > > > >
> > > > > > > Josh
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Joshua Ruppert Posted on 2002-09-12 15:00:06.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
From: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 11:00:06 -0400
Lines: 130
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_fQPZx3mWCHA.288@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com> <364_GTA2oKeWCHA.161@forums.sybase.com> <364_rRcNSJmWCHA.161@forums.sybase.com> <364_N4PgTbmWCHA.311@forums.sybase.com> <364_u9c2jzmWCHA.300@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:285
Article PK: 712861

Sorry I was mingling the two (Set/Get and comparisons of objects). I just
like the use of operators over the use of methods for direct comparison of
objects and basic Set/Get methods.

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:u9c2jzmWCHA.300@forums.sybase.com...
> I agree -- that was my answer to your "what do you gain" question.
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network -- http://sdn.sybase.com
>
> "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com> wrote in message
> news:N4PgTbmWCHA.311@forums.sybase.com...
> > It's visually cleaner based on my previously stated 'purpose' (obviously
> not
> > the only purpose, but an important one) of OO programming and stance
> against
> > direct property access.
> >
> > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote
in
> > message news:rRcNSJmWCHA.161@forums.sybase.com...
> > > "cleaner" object-oriented approach? I happen to like C++ a lot, but
> > operator
> > > overloading is something I rarely use. In the case where I need to
> compare
> > > two objects value-wise (as opposed to reference-wise), I prefer Java's
> > > equals() to C++'s "=".
> > >
> > > --
> > > <hopethishelps/>
> > > Roy Kiesler [TeamSybase]
> > > Sybase Developer Network -- http://sdn.sybase.com
> > >
> > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > news:GTA2oKeWCHA.161@forums.sybase.com...
> > > > What do you gain by using the equals() method?
> > > >
> > > > Josh
> > > >
> > > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
> wrote
> > in
> > > > message news:1N0yNvdWCHA.74@forums.sybase.com...
> > > > > We've discussed this topic in the futures forum a while back --
> there
> > > was
> > > > > sort of a concensus that a Java-like equals() method would better
> > > address
> > > > > the comparison aspect of objects. FWIW, you can implement this
today
> > in
> > > a
> > > > > semi-generic way (using ClassDefinition).
> > > > >
> > > > > As far as Get/Set methods "masked" by an "=" operator, I
personally
> > > think
> > > > > this sends the wrong message to the programmer using your class,
> i.e.,
> > > > > "don't use get/set methods -- assign values directly)
> > > > >
> > > > > --
> > > > > <hopethishelps/>
> > > > > Roy Kiesler [TeamSybase]
> > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > >
> > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > news:k9m8ITdWCHA.74@forums.sybase.com...
> > > > > > I just thought it would be nice to be able to compare two
> instances
> > of
> > > > the
> > > > > > same object. Otherwise it really just makes for prettier code to
> > > beable
> > > > to
> > > > > > overload the "=" for Set and Get methods for object properties.
To
> > be
> > > > > honest
> > > > > > it has been a while since I have played with this (I've been
> pretty
> > > much
> > > > > > strickly using PB for the last four years) and I'm not even sure
> if
> > > you
> > > > > can
> > > > > > do the second within C++.
> > > > > >
> > > > > > Josh
> > > > > >
> > > > > > "Roy Kiesler [TeamSybase]"
<SPAM_FREE_roy.kiesler@teamsybase.com>
> > > wrote
> > > > in
> > > > > > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > > > > > No. What exactly do you have in mind?
> > > > > > >
> > > > > > > --
> > > > > > > <hopethishelps/>
> > > > > > > Roy Kiesler [TeamSybase]
> > > > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > > > >
> > > > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > > > > > Is there any way now, or any plan in the future to allow for
> > > > > overloading
> > > > > > > > operators within objects?
> > > > > > > >
> > > > > > > > Josh
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Roy Kiesler [TeamSybase] Posted on 2002-09-12 17:01:19.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 13:01:19 -0400
Lines: 158
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host131.percussion.com 208.252.62.131
Message-ID: <364_FLDw1$nWCHA.300@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com> <364_GTA2oKeWCHA.161@forums.sybase.com> <364_rRcNSJmWCHA.161@forums.sybase.com> <364_N4PgTbmWCHA.311@forums.sybase.com> <364_u9c2jzmWCHA.300@forums.sybase.com> <364_fQPZx3mWCHA.288@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:283
Article PK: 712852

Well, unfortunately, operator overloading is a 3GL feature not available in
a 4GL language such as PowerScript.

Using C++, one also has to create a copy constructor when overloading the
"=" operator. At this point in time, PowerScript only supports one
constructor per object.

To sum this up, though, I'll tell you what product management's response is
likely to be on this -- "will it sell more copies of PowerBuilder?"
personally, I don't believe so.

--
<hopethishelps/>
Roy Kiesler [TeamSybase]
Sybase Developer Network -- http://sdn.sybase.com

"Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com> wrote in message
news:fQPZx3mWCHA.288@forums.sybase.com...
> Sorry I was mingling the two (Set/Get and comparisons of objects). I just
> like the use of operators over the use of methods for direct comparison of
> objects and basic Set/Get methods.
>
> "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
> message news:u9c2jzmWCHA.300@forums.sybase.com...
> > I agree -- that was my answer to your "what do you gain" question.
> >
> > --
> > <hopethishelps/>
> > Roy Kiesler [TeamSybase]
> > Sybase Developer Network -- http://sdn.sybase.com
> >
> > "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com> wrote in message
> > news:N4PgTbmWCHA.311@forums.sybase.com...
> > > It's visually cleaner based on my previously stated 'purpose'
(obviously
> > not
> > > the only purpose, but an important one) of OO programming and stance
> > against
> > > direct property access.
> > >
> > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
wrote
> in
> > > message news:rRcNSJmWCHA.161@forums.sybase.com...
> > > > "cleaner" object-oriented approach? I happen to like C++ a lot, but
> > > operator
> > > > overloading is something I rarely use. In the case where I need to
> > compare
> > > > two objects value-wise (as opposed to reference-wise), I prefer
Java's
> > > > equals() to C++'s "=".
> > > >
> > > > --
> > > > <hopethishelps/>
> > > > Roy Kiesler [TeamSybase]
> > > > Sybase Developer Network -- http://sdn.sybase.com
> > > >
> > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > news:GTA2oKeWCHA.161@forums.sybase.com...
> > > > > What do you gain by using the equals() method?
> > > > >
> > > > > Josh
> > > > >
> > > > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
> > wrote
> > > in
> > > > > message news:1N0yNvdWCHA.74@forums.sybase.com...
> > > > > > We've discussed this topic in the futures forum a while back --
> > there
> > > > was
> > > > > > sort of a concensus that a Java-like equals() method would
better
> > > > address
> > > > > > the comparison aspect of objects. FWIW, you can implement this
> today
> > > in
> > > > a
> > > > > > semi-generic way (using ClassDefinition).
> > > > > >
> > > > > > As far as Get/Set methods "masked" by an "=" operator, I
> personally
> > > > think
> > > > > > this sends the wrong message to the programmer using your class,
> > i.e.,
> > > > > > "don't use get/set methods -- assign values directly)
> > > > > >
> > > > > > --
> > > > > > <hopethishelps/>
> > > > > > Roy Kiesler [TeamSybase]
> > > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > > >
> > > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > > news:k9m8ITdWCHA.74@forums.sybase.com...
> > > > > > > I just thought it would be nice to be able to compare two
> > instances
> > > of
> > > > > the
> > > > > > > same object. Otherwise it really just makes for prettier code
to
> > > > beable
> > > > > to
> > > > > > > overload the "=" for Set and Get methods for object
properties.
> To
> > > be
> > > > > > honest
> > > > > > > it has been a while since I have played with this (I've been
> > pretty
> > > > much
> > > > > > > strickly using PB for the last four years) and I'm not even
sure
> > if
> > > > you
> > > > > > can
> > > > > > > do the second within C++.
> > > > > > >
> > > > > > > Josh
> > > > > > >
> > > > > > > "Roy Kiesler [TeamSybase]"
> <SPAM_FREE_roy.kiesler@teamsybase.com>
> > > > wrote
> > > > > in
> > > > > > > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > > > > > > No. What exactly do you have in mind?
> > > > > > > >
> > > > > > > > --
> > > > > > > > <hopethishelps/>
> > > > > > > > Roy Kiesler [TeamSybase]
> > > > > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > > > > >
> > > > > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > > > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > > > > > > Is there any way now, or any plan in the future to allow
for
> > > > > > overloading
> > > > > > > > > operators within objects?
> > > > > > > > >
> > > > > > > > > Josh
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Joshua Ruppert Posted on 2002-09-12 17:33:31.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
From: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 13:33:31 -0400
Lines: 177
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_ZOKcgNoWCHA.300@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com> <364_GTA2oKeWCHA.161@forums.sybase.com> <364_rRcNSJmWCHA.161@forums.sybase.com> <364_N4PgTbmWCHA.311@forums.sybase.com> <364_u9c2jzmWCHA.300@forums.sybase.com> <364_fQPZx3mWCHA.288@forums.sybase.com> <364_FLDw1$nWCHA.300@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:281
Article PK: 712860

I understand, I just thought I would put my 2 cents in. Having worked within
PB for a while now, I have a pretty good grasp on how difficult it might be
to add a feature like that seeing as there is no real precident for that
kind of programming structure. PB is just focused differently.

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:FLDw1$nWCHA.300@forums.sybase.com...
> Well, unfortunately, operator overloading is a 3GL feature not available
in
> a 4GL language such as PowerScript.
>
> Using C++, one also has to create a copy constructor when overloading the
> "=" operator. At this point in time, PowerScript only supports one
> constructor per object.
>
> To sum this up, though, I'll tell you what product management's response
is
> likely to be on this -- "will it sell more copies of PowerBuilder?"
> personally, I don't believe so.
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network -- http://sdn.sybase.com
>
> "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com> wrote in message
> news:fQPZx3mWCHA.288@forums.sybase.com...
> > Sorry I was mingling the two (Set/Get and comparisons of objects). I
just
> > like the use of operators over the use of methods for direct comparison
of
> > objects and basic Set/Get methods.
> >
> > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote
in
> > message news:u9c2jzmWCHA.300@forums.sybase.com...
> > > I agree -- that was my answer to your "what do you gain" question.
> > >
> > > --
> > > <hopethishelps/>
> > > Roy Kiesler [TeamSybase]
> > > Sybase Developer Network -- http://sdn.sybase.com
> > >
> > > "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com> wrote in message
> > > news:N4PgTbmWCHA.311@forums.sybase.com...
> > > > It's visually cleaner based on my previously stated 'purpose'
> (obviously
> > > not
> > > > the only purpose, but an important one) of OO programming and stance
> > > against
> > > > direct property access.
> > > >
> > > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
> wrote
> > in
> > > > message news:rRcNSJmWCHA.161@forums.sybase.com...
> > > > > "cleaner" object-oriented approach? I happen to like C++ a lot,
but
> > > > operator
> > > > > overloading is something I rarely use. In the case where I need to
> > > compare
> > > > > two objects value-wise (as opposed to reference-wise), I prefer
> Java's
> > > > > equals() to C++'s "=".
> > > > >
> > > > > --
> > > > > <hopethishelps/>
> > > > > Roy Kiesler [TeamSybase]
> > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > >
> > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > news:GTA2oKeWCHA.161@forums.sybase.com...
> > > > > > What do you gain by using the equals() method?
> > > > > >
> > > > > > Josh
> > > > > >
> > > > > > "Roy Kiesler [TeamSybase]"
<SPAM_FREE_roy.kiesler@teamsybase.com>
> > > wrote
> > > > in
> > > > > > message news:1N0yNvdWCHA.74@forums.sybase.com...
> > > > > > > We've discussed this topic in the futures forum a while
back --
> > > there
> > > > > was
> > > > > > > sort of a concensus that a Java-like equals() method would
> better
> > > > > address
> > > > > > > the comparison aspect of objects. FWIW, you can implement this
> > today
> > > > in
> > > > > a
> > > > > > > semi-generic way (using ClassDefinition).
> > > > > > >
> > > > > > > As far as Get/Set methods "masked" by an "=" operator, I
> > personally
> > > > > think
> > > > > > > this sends the wrong message to the programmer using your
class,
> > > i.e.,
> > > > > > > "don't use get/set methods -- assign values directly)
> > > > > > >
> > > > > > > --
> > > > > > > <hopethishelps/>
> > > > > > > Roy Kiesler [TeamSybase]
> > > > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > > > >
> > > > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > > > news:k9m8ITdWCHA.74@forums.sybase.com...
> > > > > > > > I just thought it would be nice to be able to compare two
> > > instances
> > > > of
> > > > > > the
> > > > > > > > same object. Otherwise it really just makes for prettier
code
> to
> > > > > beable
> > > > > > to
> > > > > > > > overload the "=" for Set and Get methods for object
> properties.
> > To
> > > > be
> > > > > > > honest
> > > > > > > > it has been a while since I have played with this (I've been
> > > pretty
> > > > > much
> > > > > > > > strickly using PB for the last four years) and I'm not even
> sure
> > > if
> > > > > you
> > > > > > > can
> > > > > > > > do the second within C++.
> > > > > > > >
> > > > > > > > Josh
> > > > > > > >
> > > > > > > > "Roy Kiesler [TeamSybase]"
> > <SPAM_FREE_roy.kiesler@teamsybase.com>
> > > > > wrote
> > > > > > in
> > > > > > > > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > > > > > > > No. What exactly do you have in mind?
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > <hopethishelps/>
> > > > > > > > > Roy Kiesler [TeamSybase]
> > > > > > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > > > > > >
> > > > > > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > > > > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > > > > > > > Is there any way now, or any plan in the future to allow
> for
> > > > > > > overloading
> > > > > > > > > > operators within objects?
> > > > > > > > > >
> > > > > > > > > > Josh
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Joshua Ruppert Posted on 2002-09-12 13:50:45.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
From: "Joshua Ruppert" <noMOREspam_rupe_j@hotmail.com>
Subject: Re: Overloading operators
Date: Thu, 12 Sep 2002 09:50:45 -0400
Lines: 96
Organization: SophiTEC, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host-64-65-207-9.roc.choiceone.net 64.65.207.9
Message-ID: <364_MEP4BRmWCHA.324@forums.sybase.com>
References: <364_xhsh5dcWCHA.300@forums.sybase.com> <364_j7OkpJdWCHA.324@forums.sybase.com> <364_k9m8ITdWCHA.74@forums.sybase.com> <364_1N0yNvdWCHA.74@forums.sybase.com> <364_GTA2oKeWCHA.161@forums.sybase.com> <364_rRcNSJmWCHA.161@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:288
Article PK: 712864

It's purely personal preference, I used it all the time. But I still believe
that directly accessing properties is not proper OO design.

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:rRcNSJmWCHA.161@forums.sybase.com...
> "cleaner" object-oriented approach? I happen to like C++ a lot, but
operator
> overloading is something I rarely use. In the case where I need to compare
> two objects value-wise (as opposed to reference-wise), I prefer Java's
> equals() to C++'s "=".
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network -- http://sdn.sybase.com
>
> "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> news:GTA2oKeWCHA.161@forums.sybase.com...
> > What do you gain by using the equals() method?
> >
> > Josh
> >
> > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote
in
> > message news:1N0yNvdWCHA.74@forums.sybase.com...
> > > We've discussed this topic in the futures forum a while back -- there
> was
> > > sort of a concensus that a Java-like equals() method would better
> address
> > > the comparison aspect of objects. FWIW, you can implement this today
in
> a
> > > semi-generic way (using ClassDefinition).
> > >
> > > As far as Get/Set methods "masked" by an "=" operator, I personally
> think
> > > this sends the wrong message to the programmer using your class, i.e.,
> > > "don't use get/set methods -- assign values directly)
> > >
> > > --
> > > <hopethishelps/>
> > > Roy Kiesler [TeamSybase]
> > > Sybase Developer Network -- http://sdn.sybase.com
> > >
> > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > news:k9m8ITdWCHA.74@forums.sybase.com...
> > > > I just thought it would be nice to be able to compare two instances
of
> > the
> > > > same object. Otherwise it really just makes for prettier code to
> beable
> > to
> > > > overload the "=" for Set and Get methods for object properties. To
be
> > > honest
> > > > it has been a while since I have played with this (I've been pretty
> much
> > > > strickly using PB for the last four years) and I'm not even sure if
> you
> > > can
> > > > do the second within C++.
> > > >
> > > > Josh
> > > >
> > > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
> wrote
> > in
> > > > message news:j7OkpJdWCHA.324@forums.sybase.com...
> > > > > No. What exactly do you have in mind?
> > > > >
> > > > > --
> > > > > <hopethishelps/>
> > > > > Roy Kiesler [TeamSybase]
> > > > > Sybase Developer Network -- http://sdn.sybase.com
> > > > >
> > > > > "Joshua Ruppert" <rupe_j@hotmail.com> wrote in message
> > > > > news:xhsh5dcWCHA.300@forums.sybase.com...
> > > > > > Is there any way now, or any plan in the future to allow for
> > > overloading
> > > > > > operators within objects?
> > > > > >
> > > > > > Josh
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>