[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT: C++, yuck!

From: Lee Sau Dan
Subject: Re: OT: C++, yuck!
Date: 04 Mar 2002 09:27:10 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Gianni" == Gianni Mariani <address@hidden> writes:

    Gianni> You can't be serious ! *Every* language has problems.

But C++ has more than others.

C++ is  really very  good at autoTRagically  generating code  that you
didn't write at all.  And these autoTRagic code are not dormant there.
Your seemingly innocent  code may have made a  few autoTRagic calls to
them without you  noticing it.  All of these  autoTRagic would be nice
if they're  totally transparent to  the user (i.e.   programmer).  But
they're  not.    They  can   really  fail  autoTRagically   in  highly
unintuitive ways.  Without  a deep knowledge of C++,  you'll be unable
to  discover  and understand  why  your  program  is working  in  that
autoTRagically way,  not the  way you intended.   And then,  you'll be
swearing at all these autoTRagic features!

These  autoTRagically generated and  invoked code  may sound  great if
you're new to  C++ and OOP.  They help you do  many things without you
telling it  to do so.   But very soon  after the honeymoon  week, such
autoTRagically  features will  reveal themselves  as  tragedies.  They
actually  make  bugs  in  moderately  large  C++  programs  very  very
difficult  to   identify  and  locate,  unless  you   have  very  very
experienced C++ programmers (who would then not produce such code, but
be busy helping the newbie colleagues to find such bugs and explain to
them why such code would be there so unexpectedly).

If you  are experienced enough in  C++, then you should  know what I'm
talk about.  (If not, please ask,  and I'll state them in a followup.)
If you  aren't aware that  C++ would autoTRagically generate  code and
execute  them at run  time for  what you  didn't write  at all  in the
source code, then please don't  pretend to be an expert experienced in

    Gianni> There is no panacea.

Right.   But others  have better  immune  systems and  hence are  less
likely to need a panacea.  Would a C compiler generate code for what I
have never written, and the generated code would affect the behaviours
of my program (i.e. not being transparent)?

    Gianni> So, even though C++ has "niggling yucky details" it is the
    Gianni> Right(tm) choice for many applications; and for a large
    Gianni> subset, the only suitable language.

Do you  really know what  these "niggling yucky details"  are?  Please
name 3 of them, or I won't be convinced that you know enough about C++
as a programming language to make  a good judgement when you say it is
the only suitable language for many applications.

BTW, how many  other languages have you heard of?   And how many other
programming paradigms do you know?

Lee Sau Dan                     李守敦(Big5)                    address@hidden(HZ) 

E-mail: address@hidden
Home page:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]