Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: Current languages are a mess, what would you choose C#, Java or C++?

Reply
Thread Tools

Re: Current languages are a mess, what would you choose C#, Java or C++?

 
 
Michael Wojcik
Guest
Posts: n/a
 
      01-13-2005

In article <>, Programmer Dude <> writes:
>
> That's certainly the expressed fear. I just wonder sometimes how
> many programmers ever really abused operator overloading (considering
> every book I've read about languages that allow it seem to hammer in
> the point about being sensible)...
>
> Anyone ever run into any bad examples of it?


That's rather subjective, isn't it? Personally, I don't even like
the use of the shift operators in C++ iostreams (and yes, I've read
Stroustrop's explanation of why he chose them). Nor am I
particularly keen on overloading, say, array indexing to implement
virtual arrays.

But many people have no quibbles with either of those.

--
Michael Wojcik

Warning: may contain traces of nuts.
-- Adapted from a sig line used by Walter Roberson
 
Reply With Quote
 
 
 
 
jacob navia
Guest
Posts: n/a
 
      01-13-2005
Michael Wojcik wrote:
> In article <>, Programmer Dude <> writes:
>
>>That's certainly the expressed fear. I just wonder sometimes how
>>many programmers ever really abused operator overloading (considering
>>every book I've read about languages that allow it seem to hammer in
>>the point about being sensible)...
>>
>>Anyone ever run into any bad examples of it?

>
>
> That's rather subjective, isn't it? Personally, I don't even like
> the use of the shift operators in C++ iostreams (and yes, I've read
> Stroustrop's explanation of why he chose them). Nor am I
> particularly keen on overloading, say, array indexing to implement
> virtual arrays.
>


Why would you say that indexing a sparse/virtual array
should not be done with operator overloading?

Could you explain?

Thanks


> But many people have no quibbles with either of those.
>

 
Reply With Quote
 
 
 
 
Ben Midgley
Guest
Posts: n/a
 
      01-13-2005
You are posting to comp.lang.c here so I reckon you are going to get a
biased opinon against Java but frankly Ansi C is the only C worth using in
anger, C++ is a bastardised version of C with a lot of problems but frankly
it has all the benefits widely available libs and open source code so it is
the weapon of choice, C# ..who cares and Java is at least built from the
ground up as the 'object orientated' language it proposes to be unlike the
other two.


"Michael Wojcik" <> wrote in message
news:...
>
> In article <>, Programmer Dude

<> writes:
> >
> > That's certainly the expressed fear. I just wonder sometimes how
> > many programmers ever really abused operator overloading (considering
> > every book I've read about languages that allow it seem to hammer in
> > the point about being sensible)...
> >
> > Anyone ever run into any bad examples of it?

>
> That's rather subjective, isn't it? Personally, I don't even like
> the use of the shift operators in C++ iostreams (and yes, I've read
> Stroustrop's explanation of why he chose them). Nor am I
> particularly keen on overloading, say, array indexing to implement
> virtual arrays.
>
> But many people have no quibbles with either of those.
>
> --
> Michael Wojcik
>
> Warning: may contain traces of nuts.
> -- Adapted from a sig line used by Walter Roberson



 
Reply With Quote
 
Erik de Castro Lopo
Guest
Posts: n/a
 
      01-13-2005
Michael Wojcik wrote:
>
> That's rather subjective, isn't it? Personally, I don't even like
> the use of the shift operators in C++ iostreams (and yes, I've read
> Stroustrop's explanation of why he chose them).


No matter how he tries to justify, he wrong. I find it ironic
that the main i/o library in C++ is one of the best examples
of the abuse of operator overloading.

> Nor am I
> particularly keen on overloading, say, array indexing to implement
> virtual arrays.


Thats another horror.

> But many people have no quibbles with either of those.


Many people are fools and idiots. Many people have no taste.

Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo (Yes it's valid)
+-----------------------------------------------------------+
"I invented the term Object-Oriented, and I can tell you I did not
have C++ in mind." -- Alan Kay
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      01-13-2005
Erik de Castro Lopo wrote:

> Michael Wojcik wrote:
>
>>That's rather subjective, isn't it? Personally, I don't even like
>>the use of the shift operators in C++ iostreams (and yes, I've read
>>Stroustrop's explanation of why he chose them).

>
>
> No matter how he tries to justify, he wrong. I find it ironic
> that the main i/o library in C++ is one of the best examples
> of the abuse of operator overloading.
>


I thought it was the visual appeal of >> (output)
and << (input) isn't it?

That is not so bad as string addition. That is worst,
since a+b != b+a...

Other bad examples include date addition, and other things
where operator overloading is not justified.
>
>>Nor am I
>>particularly keen on overloading, say, array indexing to implement
>>virtual arrays.

>


Why not?

You could build a sparse array library that allows
the old code to be used transparently.

Suppose you have software that uses normal arrays
and you want to use it with sparse arrays
since the data sets are thinly spread across the
array.

By redeclaring the arrays as "Sparse_array"
(or whatever) you can use the old software
without change, very useful.

Besides operator overloading allows for the
easy creation of number representations, and
it is the best example where it is *really*
useful.

Lcc-win32 implements operator overloading and I think
it is useful if used with care.
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      01-14-2005
Michael Wojcik wrote:
>

.... snip ...
>
> That's rather subjective, isn't it? Personally, I don't even like
> the use of the shift operators in C++ iostreams (and yes, I've read
> Stroustrop's explanation of why he chose them). ....


That actually makes some sense to me, if you think of the operation
of shifting data between internal buffers and external files. The
arrows point in the direction of flow.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson


 
Reply With Quote
 
Michael Wojcik
Guest
Posts: n/a
 
      01-14-2005

In article <>, (Michael Wojcik) writes:
>
> That's rather subjective, isn't it? Personally, I don't even like
> the use of the shift operators in C++ iostreams ...


Gah. That was supposed to be posted to comp.programming. xrn gets
the newsgroups: header using the NNTP XHDR command, and Newsguy's
NNTP server only supports XHDR for some headers, not including
newsgroups. Consequently, I have to enter the newsgroup manually,
until I stop procrastinating and fix xrn to extract the newsgroup
header from the message I'm following up.

In this case I entered the wrong group.

Terribly sorry about that.

--
Michael Wojcik

Thanks for your prompt reply and thanks for your invitatin to your
paradise. Based on Buddihism transmigration, I realize you, European,
might be a philanthropist in previous life!
-- supplied by Stacy Vickers
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If you only had one backdrop whhat would you choose? Gopish Too Digital Photography 8 11-09-2005 06:40 PM
Which would you choose? sandy Digital Photography 11 09-06-2005 04:31 PM
Which would you choose: Canon SD300 or Panasonice Lumix FX7 Newbie Digital Photography 3 04-15-2005 11:24 PM
Which of these players would you choose? Tony Olmstead DVD Video 3 06-28-2004 07:49 AM
Which Online Photo Service would you choose for wedding photos? sd13sd_noquiltspam@yahoo.com Digital Photography 3 11-25-2003 08:26 PM



Advertisments