Board index » delphi » Re: Overloading Operators

Re: Overloading Operators


2003-07-14 11:15:51 PM
delphi193
In borland.public.delphi.non-technical, "John Herbster (TeamB)" <>wrote in
message <XXXX@XXXXX.COM>...
Quote

"Captain Jake" <johnjac76[nospam]@comcast.net>wrote
>Any chance that Delphi 8 will let us overload operators?

Captain, Do mean like "+" and "-" with integer, floats,
sets, and, for "+" at least, with strings? Rgds, JohnH


I mean like where I can define my own data type as a class but have it act
just like a native data type because I have defined the operators that I
want to work in unique ways. Like you can do in C++.
--
***Posted by Jake's Custom Newsgroup Reader***
Posted using Jake's Super Newsreader 0.9.2.953
 
 

Re: Overloading Operators

Quote
Like you can do in C++.
This conversation gets done to death all too often. Operator overloading
is not universally popular. In many people's opinion it contributes
significantly to the impenetrable code so beloved of C++ developers.
If you want to use C++, use C++. Delphi should not have all the
"features" of C++ because some of them are bad - macros, operator
overloading and multiple inheritance being prime examples.
Cheers,
Jim Cooper
____________________________________________
Jim Cooper XXXX@XXXXX.COM
Tabdee Ltd www.tabdee.ltd.uk
TurboSync - Connecting Delphi with your Palm
____________________________________________
 

Re: Overloading Operators

"Jim Cooper" <XXXX@XXXXX.COM>skrev i en meddelelse
Quote
If you want to use C++, use C++. Delphi should not have all the
"features" of C++ because some of them are bad - macros, operator
overloading and multiple inheritance being prime examples.
They are not just bad, they are evil.
Evil, be gone!
--
Finn Tolderlund
 

Re: Overloading Operators

In borland.public.delphi.non-technical, Jim Cooper <XXXX@XXXXX.COM>
writes <XXXX@XXXXX.COM>...
Quote
If you want to use C++, use C++. Delphi should not have all the
"features" of C++ because some of them are bad - macros, operator
overloading and multiple inheritance being prime examples.
That's ridiculous. All three of those things are powerful and useful if used
by a disciplined programmer.
--
***Posted by Jake's Custom Newsgroup Reader***
Posted using Jake's Super Newsreader 0.9.2.953
 

Re: Overloading Operators

"Captain Jake" <johnjac76[nospam]@comcast.net>wrote
Quote
... if used by a disciplined programmer ...
Disciplined programmers are getting harder to find.
 

Re: Overloading Operators

"Jim Cooper" <XXXX@XXXXX.COM>wrote ...
Quote
If you want to use C++, use C++. Delphi should not have all the
"features" of C++ because some of them are bad
tinyurl.com/gvw6 short for
www.google.com/search
 

Re: Overloading Operators

Janez Makovsek writes:
Quote
If Delphi would have compiler features added continuously it would be
on pair with C++ sooner or later.
This sentence can be read two ways.
--
David Marcus
 

Re: Overloading Operators

On Mon, 14 Jul 2003 18:23:56 +0100, Jim Cooper <XXXX@XXXXX.COM>
writes:
Quote

>That's ridiculous.

No it is not. All those things too often make code harder to read,
"disciplined" programmers or not.

>All three of those things are powerful and useful if used
>by a disciplined programmer.

If you think they're a good idea then use a language that supports them.
One of the main reasons for using Delphi is that it doesn't.
This is the best repsonse to a technical "religious" issue I have read
in a long time. Thank you, Jim.
I'm glad Borland refuses to transform the Delphi language into another
language. I would rather the C++ users lobby to have C++Builder provide
more of the features Delphi has than change the Delphi language to be
more like C++.
 

Re: Overloading Operators

Hi!
Quote
No it is not. All those things too often make code harder to read,
"disciplined" programmers or not.

>All three of those things are powerful and useful if used
>by a disciplined programmer.

If you think they're a good idea then use a language that supports them.
One of the main reasons for using Delphi is that it doesn't.
One important feature of Delphi could be to implement
operator overloading in a much better way then C++...
(same for other missing language features.)
Regards!
Janez.
 

Re: Overloading Operators

Finn Tolderlund writes:
Quote
They are not just bad, they are evil.
Evil, be gone!
When I took a course at U of Waterloo (no I was not a student) they
were using IBM Visual age for Win NT, lol, when we saw all those lines
representing "observers" and "notifiers" it looked like art deco
spaghetti - Spaghetti code for real.
LOL
The NT port was buggy, (ported from small talk to OS 2 then to NT).
The prof declared that the library was over inherited and that we
should use the STL, but he never did explain how the STL fit into an
object model.
Having only one base class TObject makes things much simpler, even
though you have to resort to delegation.
I tried C++, but found it far too intricate and fussy for my
temperament.
When you even mild dyslexia, the syntax and case sensitivity of c++ is
a nightmare.
God bless Borland for Delphi
 

Re: Overloading Operators

On 14-Jul-03, Luk Vermeulen said:
Quote
It's also one of the main reasons for looking at C#. Do you want Delphi to
become an ivory-tower language like Java? A select committee deciding what
is too hard for you to understand in terms of syntax? Languages should not
remain stagnant, they should evolve.
Interesting. I hadn't come to the point of characterizing Java as "ivory tower", but it might go a long way toward explaining many of the things I do not like about it.
Quote
Personally I know what I like and what I want. If you don't want operator
overloading, don't use it. But give it to those who do want it.
Fair enough. I also know what I like (the spare elegance of Delphi) and what I do not (for Delphi to "evolve" into many of the misbegotten features of C++.) Had Delphi been evolved in such a direction over the years, rather than being kept lean by focused design, then those here who claim it is dead might by now have been correct.
--
Bill
--------
People have a right to their own cultures -- even Americans. Those who come here and say that they cannot follow some of our laws that conflict with their culture are free to leave. -- Thomas Sowell
 

Re: Overloading Operators

"Luk Vermeulen" <Arf>writes
Quote
Personally I know what I like and what I want. If you don't want operator
overloading, don't use it. But give it to those who do want it.
It's not that simple, though. If operator overloading gets added to the
language, then people who don't like it would still have to deal with it in
other people's code.
(I have nothing against operator overloading, as long as I can define my
operators to behave like the default ones. You can not do that in C++.)
Mike
 

Re: Overloading Operators

In borland.public.delphi.non-technical, William Meyer <>writes
<XXXX@XXXXX.COM>...
Quote
Fair enough. I also know what I like (the spare elegance of Delphi) and what I do not (for Delphi to "evolve" into many of the misbegotten
features of C++.) Had Delphi been evolved in such a direction over the years,
rather than being kept lean by focused design, then those here who
claim it is dead might by now have been correct.
If that argument held water then we should all be VB(Visual Basic) programmers, since that
is even simpler still, lacking many language features sported by
Delphi. VB(Visual Basic) was far more lean than Delphi in that sense.
--
***Posted by Jake's Custom Newsgroup Reader***
Posted using Jake's Super Newsreader 0.9.2.953
 

Re: Overloading Operators

On 14-Jul-03, Captain Jake said:
Quote
If that argument held water then we should all be VB(Visual Basic) programmers, since that
is even simpler still, lacking many language features sported by
Delphi. VB(Visual Basic) was far more lean than Delphi in that sense.
C'mon, Jake, I didn't say it shouldn't change, only that it should be changed with care.
--
Bill
--------
People have a right to their own cultures -- even Americans. Those who come here and say that they cannot follow some of our laws that conflict with their culture are free to leave. -- Thomas Sowell
 

Re: Overloading Operators

"Captain Jake" <johnjac76[nospam]@comcast.net>writes
Quote

Any chance that Delphi 8 will let us overload operators?
You already can. Look up custom variants and VarCplx for an example.
sm