Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:3449] Re: OT] C++ (was: Re: Csound API Split, design)

Date2003-11-21 00:52
From"Michael Gogins"
Subject[CSOUND-DEV:3449] Re: OT] C++ (was: Re: Csound API Split, design)
I find the statement that reading C++ is more difficult than reading C not
to be true for everybody - certainly not for me.

The more complex the project is, the easier reading C++ is for me compared
to C. I also tend to find that the more complex the project is, the more
likely it is to be written in C++, which is the language of choice today for
shrinkwrap applications, a lot of systems and internet programming, and some
scientific programming (or a mixture of FORTRAN and C++).

On SourceForge, the number of projects for C is just a little bit larger
than the number for C++, but if you compare object-oriented languages with
functional languages with procedural languages, the percentages are 57 to 1
to 42.

Don't mistake me - I am NOT arguing that Csound should be rewritten in C++!
It's fine in C. There might be reasons to do some new development in Csound
in C++, however.

============================================
Michael Gogins
gogins at pipeline period com
Irreducible Productions
CsoundVST, an extended version of Csound for programming music and sound
Available at http://sourceforge.net/projects/csound/
============================================


----- Original Message ----- 
From: "Richard Dobson" 
To: "Csound Developers Discussion List" 
Sent: Thursday, November 20, 2003 5:19 AM
Subject: [CSOUND-DEV:3435] Re: Csound API Split, design


> I think John meant, as I would mean, that reading other people's C++
> programs (especially if abstrusely engaged with templates and other
> arcania), is like dancing in the dark on the edge of a cliff.
>
> Most of the time, a C program is reasonably easy to read - even
> Csound's. But reading someone else's C++ (where by definition so much is
> hidden) is a nightmare. It is all but impossible to find out what it is
> doing. You have to spend hours studying all the derivations,
> inheritances, templates of templates and whatnot. It can be even worse
> than dealing with global variables.    People object to COM for just
> these reasons, though that is in many ways the apotheosis of C++. I like
> ~simple~ C++, and write simple C++, but most people don't write simple
> C++. And it can get really complicated really quickly! Overload one
> function, and you suddenly have to worry about type-this, operator-that,
> "prevent the programmer from doing this", throw a thousand distinct
> exceptions; and so many people still allocate memory or load files in
> constructors.
>
> I took a look at that notorious attempt to convert Csound to C++. It was
> immediately obvious that it would be horribly difficult to add the
> sreaming pvoc opcodes to it, without breaking some obscure but vital
> aspect of the "design". I wouldn't even have known where to start, and
> the suspicion remains that it was, in fact, impossible. The author, of
> course, understands it perfectly and can't understand why other people
> don't.
>
>
>
> Richard Dobson
>
>
>
>
>
>
> Chris McCormick wrote:
> > On Thu, Nov 20, 2003 at 06:39:51AM +0000, John ffitch wrote:
> >
> >>I have taught C++, read C++, last program I wrote was written in C++.  I
> >>do not like C++.changing the PLOTLEN in your code, but not
> >>  How good is your LISP?
> >
> >
> > Terrible. I have written about 30 lines of code in lisp in my life.
> >
> > Perhaps I misunderstood what you were saying, John. I don't have the
> > original mail, but I thought you said that you don't like C++ because
> > you don't know what it is doing. My point is that you should find out
> > what it is doing before you decide whether you like it or not. I mean
> > no disrespect whatsoever.
> >
> > Regards,
> >
> > Chris.
> > _________________________________
> > chris@mccormick.cx
> > http://www.mccormick.cx
> > http://www.hypercube.com.au
> > http://www.sciencegirlrecords.com
> >
> >
>