[PD] C++ for reusable dsp lib - or better use C?

Krnk Ktz krnkktz at gmail.com
Wed Feb 22 20:47:09 CET 2012


>> I
>> don't consider C++/Java to be in a different paradigm than C, because
they all use
>> the concept of storage that gets read and written along a timeline of
programme
>> steps that have to be run one after the other in the order specified by
the
>> programmer.

Sorry, I'm no professional programmer (I don't think i'm even good at it!)
but it seems like you are describing a Turing Machine, which includes every
programming language. Every languages builds to ASM (or is interpreted by
some interpreter built to ASM) and therefore use a storage modified over
the course of the time in a specific order. What matters is how you
organise your code, how you think your program. In the end, it will
actually be the same - both C and C++ build to ASM. However, C++ forces you
to think of objects while C doesn't: that's another way of thinking and
therefore another paradigm.


> Every programming language worth being calling that way is conceived to be
> used in ways it has not be conceived for.
>
>
Well, you can write purely functionnal programs in C, but good luck with
that. You can, but I don't think this is what you want to do.

>> Note that C is extremely often used for constructing interpreters for
languages that >>are especially good at things that C isn't good at.

But you construct an interpreter for a new language instead of using C the
way you would use this new language. That's how I have always seen
languages: they try to help you to write programs like you think them.
Every language brings you new ways of thinking programs. It seems also
illogical to me to try thinking in a way which is not the one your tool
does.

Again, I am probably wrong - I just would like to understand why.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120222/83c0df23/attachment-0001.htm>


More information about the Pd-list mailing list