Linux-Advocacy Digest #276, Volume #30           Fri, 17 Nov 00 00:13:05 EST

Contents:
  Re: OT: Could someone explain C++ phobia in Linux? (Donovan Rebbechi)
  Re: OT: Could someone explain C++ phobia in Linux? (Donovan Rebbechi)
  Re: A Microsoft exodus! (Keith O'Hara)
  Re: OT: Could someone explain C++ phobia in Linux? (Bob Hauck)
  Re: a ms exodus thread ("Thomas K")
  Re: OT: Could someone explain C++ phobia in Linux? ([EMAIL PROTECTED])
  Re: OT: Could someone explain C++ phobia in Linux? (Goldhammer)
  Re: OT: Could someone explain C++ phobia in Linux? ("Tom Wilson")
  Re: A Microsoft exodus! ("JS/PL")
  Re: Of course, there is a down side... (Goldhammer)
  Re: Microsoft Speaks German! ("Clifford W. Racz")

----------------------------------------------------------------------------

From: [EMAIL PROTECTED] (Donovan Rebbechi)
Subject: Re: OT: Could someone explain C++ phobia in Linux?
Date: 17 Nov 2000 03:10:19 GMT

On Fri, 17 Nov 2000 02:31:58 GMT, Darin Johnson wrote:
>[EMAIL PROTECTED] (Donovan Rebbechi) writes:
>
>> A lot of these people criticise it unfairly, in that they use the design
>> goals of *their* pet language as a yardstick to evaluate C++. Evaluating
>> other languages by the design goals set for C++  will also show C++ to
>> be "superior", but it's not a reasonable comparison.
>
>That's true.  However, when running across C++ advocates who try to
>imply it's the best choice in all situations, it's tempting to just
>slam the language rather than just ignore people whose minds won't change.
>And there are a lot of those types of C++ advocates.

There are a lot of those types of advocates for any language. For example,
a lot of the GNOME people have this attitude that you should just use C for
everything, even OO programming. And not too long ago, we had some guy,
"Richard" who was convinced that Smalltalk was the one true language (he
wanted to write an operating system in Smalltalk). There are those who
predict that Java will "kill" C++. C++ does not have a monopoly on stupidity
or bigotry.

-- 
Donovan Rebbechi * http://pegasus.rutgers.edu/~elflord/ * 
elflord at panix dot com

------------------------------

From: [EMAIL PROTECTED] (Donovan Rebbechi)
Subject: Re: OT: Could someone explain C++ phobia in Linux?
Date: 17 Nov 2000 03:37:25 GMT

On Fri, 17 Nov 2000 00:57:24 GMT, Russ Lyttle wrote:
>Donovan Rebbechi wrote:
 
>> C++ is more suitable than C for any job that requires OO.
>> 
>True. Writing kernel code for an OS just isn't one of those jobs.

Kernel code is something that procedural/modular models seem well suited
to. Still, I could imagine OO being useful even for low level code.

>> Verifiably false. C code is not going to run slower just because you
>> compile it with a C++ compiler. And replacing virtual function dispatch
>> with switch statements isn't going to make them any faster.
>> 
>Well, just a little faster. I can eliminate at least one look-up. That
>can make a big difference in running time if that look-up is getting

When you dispatch via a switch, you also have function call overhead.
I'm not clear on what you mean by lookup. I thought the virtual function 
was stored as a pointer that gets dereferenced, and the pointer is given
to the object during its creation.

>> > It is difficult to manage any sizable project in C++. Multiple
>> 
>> How so ?
>> 
>> >inheritance and friend functions are just two reasons.
>>
>You tend to get spagetti inheritance. Someone changes one base class
>just a little. The whole thing crashes.

I see. The classic "fragile base class" problem. This is avoidable if
one follows good programming practice. For example, Meyers advocates
making non leaf classes abstract, and this is a good guideline, though
one may break it from time to time.

> Big C++ projects tend to have
>this brittleness. In an ideal world changing a private method shouldn't
>affect anything else, 

In a good but not unrealistic world, private methods in base classes 
shouldn't be changed too often.

> but in the real world it does. C++ classes lock
>things up pretty tight. Then along come Friends and violate that
>protection. 

Again, good coding practices go a mile here. C++ gives you a license to
shoot yourself in the foot, but that doesn't mean that one must milk it
for all it's worth. Personally, I don't like using friends for anything
besides operator overloading. 

>> Not very good reasons. Friends are usually only used to deal with semantic
>> problems with operator overloading. The C++ approach of allowing friends
>> is certainly more robust than the C approach of exposing everything.
>> 
>I wish. But operator overloading is another problem. 

Not having operator overloading isn't a terribly pleasent alternative
though. It makes for very ugly syntax.

Like the other issues you raise, operator overloading is very easy to abuse.
You can do very stupid things and overload operator, or operator&& if you 
like, and C++ will not try to stop you.

It's definitely something that needs to be used judiciously. 

There are also some features in C that allow you to shoot yourself in the
foot and need to be used judiciously or not at all (unsafe string functions
like strcpy, strdup, gets)

But if you're pointing out that you can shoot yourself in the foot with C++
(or just blow your foot off), I'd have to agree.

>> Inheritence (especially multiple inheritence) is certainly no easier to
>> do in C than it is in C++.
>> 
>True. Which is why we come up with solutions that don't require it.

Well sometimes "you" (C programmers) do. For example, GTK/GNOME. 
CORBA supports inheritence and polymorphism at the core, and attempts to
implement it in C are possibly short of elegant. 

Other times, you don't and the result is ugly, fragile code and long switch
blocks. (See win32)

>> Sure, you can criticise polymorphism, but if your project doesn't
>> need polymorphism,  you don't need to do use it in C++ just like
>> you don't need to do it in C.
>> 
>Thats correct. And thats the point.

Well if you just want to write procedural code, the advantages of C++ 
compared to C are somewhat diminished. Having STL and strings is still 
a plus, but not a compelling reason to switch.

>> But in the instances where you do need polymorphism, well it's a hell
>> of a lot less painful in C++ than it is in C.
>> 
>For example? I've seen lots of cases where polymorphism is convient, but
>never required. 

I should have phrased that better. I meant "where you wish to use" 
polymorphism, or where polymorphism is a "design decision". I agree that 
imposing the requirement is artificial, and could be bypassed (though the
results often aren't pretty).

>> Built in support for OO. That is an advantage. Take a look at C code that
>> tries to implement inheritence and then look me in the eye and tell me
>> it's not an advantage.
>> 
>OO and C++ are two different subjects. 

But not unrelated subjects.  C++ certainly supports OO, and implementing
something like a CORBA interface in C++ is considerably less painful than
doing so in C.

> Many other languages support OO.

Yes, I agree. In fact perhaps many support it better than C++.

>If I'm working on a project that should use OO, then Ada is a better
>choice than C++, for example. (Smalltalk guys feel free to chime in).

Does ADA support late binding ? I haven't used it, but I heard it was
"object based" and didn't support the equivalent of virtual functions.

If I were to choose a favourite language exclusively on my assesment of
its design, it probably wouldn't be C++. (Eiffel looks really nice)

C++ offers a lot of good compromises IMO. This does not produce the most
aesthetically beautiful language, but it produces a language that works
very nicely. There are a lot of APIs available for it and it interoperates
very easily with C.

>> Built in support for generic programming. Try implementing a decent linked
>> list data type in C, without using macros or pointer casts.
>> 
>I do it all the time. Want a copy?

I'd be interested in seeing it. Do you have a website or something ?

-- 
Donovan Rebbechi * http://pegasus.rutgers.edu/~elflord/ * 
elflord at panix dot com

------------------------------

From: Keith O'Hara <[EMAIL PROTECTED]>
Subject: Re: A Microsoft exodus!
Crossposted-To: comp.os.ms-windows.nt.advocacy,comp.os.ms-windows.advocacy
Date: Fri, 17 Nov 2000 03:43:27 GMT

Regarding help,
Sam Morris wrote:
: Works fine for me on Win95 and 98.

Strange.  What do you get when you type ver?
Windows 95. [Version 4.00.1111]
Windows 98 [Version 4.10.2222]

-keith

------------------------------

From: [EMAIL PROTECTED] (Bob Hauck)
Subject: Re: OT: Could someone explain C++ phobia in Linux?
Reply-To: bobh{at}haucks{dot}org
Date: Fri, 17 Nov 2000 03:43:43 GMT

On Thu, 16 Nov 2000 09:15:30 -0500, mlw <[EMAIL PROTECTED]> wrote:

>Maybe I'm just old school here, if I don't have a full understanding
>about how the code I write translates to actual machine instructions, I
>find it difficult to work in the environment.

I'm a bit of a stick in the mud too, and it seems as if I do a lot of
low-level stuff like you do.  But my take on it is a bit different.

I agree with your sentiment...sometimes.  When writing device drivers,
stuff that has to run in resource-constrained environments, or other
close-to-the-metal code, it is important to have a good grip on what's
going on under the hood.  Sometimes you do have to read the compiler
output in these situations, and it is important to have a reliable
compiler with minimal bugs.  So I tend to use C for this.

OTOH, I really dislike writing GUI apps, and prefer getting the job
done as quickly as possible over knowing what assembly is being
generated and being able to tweak it to death.  I also don't like to
have to deal with memory management in these kinds of apps and having a
good OOP implementation is nice too.  Lately I have found that Python
works quite well for "workstation-based" projects where you aren't
resource-constrained and performance isn't a huge issue.

All of which means that I tend to use C and Python more than I use C++
these days.  C++ works well for certain projects that both require
high-level constucts and have strict performance requirements.  But the
set of these kinds of projects that can't be partitioned into a C part
and a high-level-language part seems to be smaller than one might
think.  Basically, I have come to not fear a mixed language approach as
much as I once did and in fact prefer it over C++ unless there's a good
reason why the whole thing needs to be done in one language.


-- 
 -| Bob Hauck
 -| To Whom You Are Speaking
 -| http://www.haucks.org/

------------------------------

From: "Thomas K" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.ms-windows.nt.advocacy,comp.os.ms-windows.advocacy,comp.sys.mac.advocacy,comp.unix.advocacy
Subject: Re: a ms exodus thread
Date: Fri, 17 Nov 2000 04:09:52 GMT

Holy cow!  I see 457 messages in that thread!

u ppl are nuts!  :-)


thomas



------------------------------

From: [EMAIL PROTECTED]
Subject: Re: OT: Could someone explain C++ phobia in Linux?
Date: Fri, 17 Nov 2000 04:01:49 GMT

In article <[EMAIL PROTECTED]>,
[snip]
> But if you're pointing out that you can shoot yourself in the foot
with C++
> (or just blow your foot off), I'd have to agree.

I'm reminded of a quote by one of my instructors: "C++ makes it harder
to shoot yourself in the foot than with ANSI C, but when you do shoot
yourself, you're gonna take your leg off at the hip."

I believe he may have paraphrased Bjarne.


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: Goldhammer <[EMAIL PROTECTED]>
Subject: Re: OT: Could someone explain C++ phobia in Linux?
Date: Fri, 17 Nov 2000 04:10:38 GMT

In article <[EMAIL PROTECTED]>,
  mlw <[EMAIL PROTECTED]> wrote:
> Goldhammer wrote:


> > Do you want an opinion on this? Ok. C++ is not a superset of C.
> > Why? I have seen some legal C which doesn't work in C++. Are these
> > examples obscure? Yes. Can you argue that they are inconsequential?
> > Probably. Then does that mean C++ really is a superset of C? No.
>
> Consider this, were the differences between ANSI C and K&R big? To
> some, yes they were. Some K&R code did not compile in ANSI C.


If you want to argue that K&R C is not proper subset of ANSI C, then
more power to you. I have no objection.


> If a compiler enforces rules which a previous compiler did not, yet
> supports the same language and constructs within the language, is it
> not considered to be the same language? For instance, if one adds
> "-pedantic-errors" to a compile line in gcc, is it no longer a C
> compiler?


Why are we talking about compilers? I thought we discussing
the actual languages.


> The differences between C and C++ compilers from the same platform and
> vendor often have fewer differences than different C compilers from
> different platforms and vendors. Do differences between C compilers
> across platforms mean the one is, and one is not, a C compiler? Of
> course not.


Sorry, I don't follow. I thought this was a discussion about the
languages C, C++.

Permit me to illustrate this via the Fortan world. There is
a long history of compiler-vendors supplying non-portable
extensions to the language. Does that mean that F77 isn't what it is?
Does that mean Absoft's f77 is different from NAG's? There were, in
fact, great differences in what various f77 compilers offered.
So what?

I've read your other posts in this thread, and I think I know
where you are coming from. You have specific programming needs,
much of it low-level, and you like the added features C++ gives
you. I completely understand this, and I agree with you. But I
also want you to understand my point of view:

You find C++ beneficial because of the kind of work you do.
Now, please accept the same argument from me: I do _not_ find
C++ useful, because of the kind of work I do. I mostly
work on numerical computing and simulation. I do _not_ find
C++ useful. In fact, I find it to be a great burden. So, for your
line of work, C++ is great, for mine, it isn't. We both have
strong opinions here based on our experience. I'm sure that you
wouldn't want to do your work in Fortran90, just as I wouldn't
want to do my work in C++. However you choose to reply to this,
don't you tell me that my interests, juggling numbers, is some kind of
obscure programming art that "Joe Programmer" would never use. What the
hell are computers here for then?

Some people here think C or C++ are such great languages,
and advocates on both sides argue endlessly over the
wonderous benefits of either. From my perspective, these
languages don't even support basic arithmetic properly.

But if I had to choose (i.e., with a gun to my head),
it would be C.


--
Don't think you are. Know you are.


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: "Tom Wilson" <[EMAIL PROTECTED]>
Subject: Re: OT: Could someone explain C++ phobia in Linux?
Date: Fri, 17 Nov 2000 04:22:59 GMT


"Russ Lyttle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Tom Wilson wrote:
> >
> > "Russ Lyttle" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> > > mlw wrote:
> > > >
> > > > I use Linux all the time, I think it is a great system. I maintain a
> > > > Windows box, but it is never used except as a TV or for Lego
Mindstorms
> > > > for my son. At work, I am fortunate in that I can use Linux.
> > > >
> > > > The one problem I have with many of Open Source people is this sort
of
> > > > emotional dislike for C++.
> > > >
> > > > I use C++ all the time, I can't even understand why someone would
start
> > > > a non-trivial project using C. C++ is a superset of C. Most C code
will
> > > > compile fine with C++, the exceptions being borderline constructs
which
> > > > are probably bad form anyway.
> > > >
> > > > This is not a troll! I am being serious and sincere. I am a software
> > > > engineer / architect professionally, and I have had to argue this
point
> > > > many times with some of guys we hire. It is my role to make sure the
> > > > right decisions are made.
> > > >
> > > > Under what circumstances is "C" a better choice than "C++?"
> > > > (excluding backward compatibility in an existing product)
> > > >
> > > > --
> > > > http://www.mohawksoft.com
> > >
> > > Easy. It isn't an emotional dislike. C++ just isn't suitable for the
> > > job. C++ is slower than C by an order of magnitude (almost as slow as
> > > Java).
> >
> > Huh? What compiler are you using, anyway?
> > Granted, compilation time can be a bit longer, but, I've never
experienced
> > slower execution times. With today's optimizing compilers, that's a
> > non-sequiter. If I ever come across C++ program that runs as slow as
> > byte-compiled Java, my first opinion would be that the programmer
> > responsible needs to invest in a good profiler and re-think his
algorhythms.
> >
> > > It is difficult to manage any sizable project in C++. Multiple
> > > inheritance and friend functions are just two reasons. C++ is almost
> > > impossible to maintain. C++ has all the weakness of C and none of its
> > > advantages. I can think of any number of alternatives to both C and
C++.
> > > But C does have the history behind it.
> >
> > It's difficult to manage a sizable project written in any language. The
key
> > is consistent structure. Though, I prefer C out of familiarity, I can
see
> > C++'s strengths. Especially where cross platform development is
concerned.
> > Placing platform specific code into class wrappers with consistent
> > interfaces is an undeniable plus in its' favor.
> >
> > --
> > Tom Wilson
> > Registered Linux User #194021
> > Also...
> >               NT 4.0 User
> >               Win 95/98 User
> >
> > They're operating systems...Not religions
> > GET A LIFE!
> Current project is Visual C++. On Linux, I use GPP. The speed disparity
> isn't as great there.

Even though I'm likely to draw flames, I rather like VC++. I've used 5.0 for
several years. I think its' the first time MS actually outdid Borland in the
language arena. (Come to think of it, the first time was when Borland
decided to put TurboBasic up against VB)

At any rate, i've just started with GPP and therefore am withholding any
opinions about its' performance.

> --
> Russ Lyttle, PE
> <http://www.flash.net/~lyttlec>
> Not Powered by ActiveX



------------------------------

From: "JS/PL" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: A Microsoft exodus!
Date: Thu, 16 Nov 2000 23:42:21 -0500


"Aaron R. Kulkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> JS/PL wrote:
> >
> > "Ayende Rahien" <[EMAIL PROTECTED]> wrote in message
> > news:8uvb49$6kj$[EMAIL PROTECTED]...
> > >
> > > "Tim Smith" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]...
> > > > Christopher Smith <[EMAIL PROTECTED]> wrote:
> > > > >Rather funny, in all the time I've been using Outlook, I've never
been
> > > > >burned by a virus.
> > > >
> > > > Then either you've configured it to be more secure than the default,
or
> > > > no one has mailed you one.  The KAK virus only required that you
view
> > > > the message (and even having the message show up in the preview pane
was
> > > > enough) to get infected.
> > > >
> > > > Haven't you ever wondered why Outlook gets hit by more viruses than
> > > > other Windows email programs?  It is because, until recently at
least,
> > > > by default, it would execute code in email WITHOUT asking for any
> > > > confirmation.
> > >
> > > Because it is, by far, the most popular one?
> >
> > Agreed.
> > That's like saying Billy-Bob's Trade Center is more secure than the
World
> > Trade Center because it's never been hit by a bomb.
>
> Are you alleging that the uptime-record holders listed on Netcraft
> haven't been attacked?

No I beleive I was comparing Outlook ( jointly with Outlook Express) to
whatever the other 100 guys are running.
Unless of couse - Netcraft is claiming the ability to report Outlook uptime
now.



------------------------------

From: [EMAIL PROTECTED] (Goldhammer)
Crossposted-To: comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy
Subject: Re: Of course, there is a down side...
Reply-To: [EMAIL PROTECTED]
Date: Fri, 17 Nov 2000 04:47:31 GMT

On Thu, 16 Nov 2000 14:02:58 GMT, 
Chad Myers <[EMAIL PROTECTED]> wrote:


>What if I didn't know what alias was? How would I find out that
>it existed?


The same way you would find out about
the existence of 'attrib' in Windows.

By the way, I did suggest that someone with a clue
should type 

alias help=man
alias assistance=man

for you into your .bashrc.
I said this for a reason.


>I'd have to buy a For Dummies book just to do basic stuff.


Agreed. In your case, that would be the best plan.


>With Windows, there are how-tos, wizards, walk-throughs, and a
>comprehensive, searchable, indexed help system.


Which teach you about the CMD.exe?


-- 
Don't think you are. Know you are.

------------------------------

From: "Clifford W. Racz" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy
Subject: Re: Microsoft Speaks German!
Date: Thu, 16 Nov 2000 23:52:41 -0500

Liberals...

Execute the unborn, kill off the old people.
Rob hard working poeple, give the money to fat, lazy people who won't do
anything.
Disarm law abiding citizens and let armed criminals go free.
Lie, cheat, steal... who cares, as long as you win the election.  Even if
you have to get aliens to vote.
Whatever.

P.S.  And Germany is a freaking Utopia, right?


"André Pönitz" <[EMAIL PROTECTED]> wrote in message
news:8v0s33$8ma$[EMAIL PROTECTED]...
> In comp.os.linux.advocacy Chad Myers <[EMAIL PROTECTED]> wrote:
> > G.W.Bush is in the lead and will rectify the situation.
>
> By having some more people executed perhaps?
>
> SCNR,
> Andre'
>
> --
> André Pönitz ........................................ [EMAIL PROTECTED]



------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.advocacy) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Advocacy Digest
******************************

Reply via email to