[wplug] relevance of C for Apps

Hagbard Celine wplug at wplug.org
Thu Oct 7 00:16:56 EDT 2004


On Wed, Oct 06, 2004 at 11:03:48AM -0400, Chris Romano wrote:
> I don't want to start a flame war or anything and this is/can be a
> loaded question, but is C still a good language for developing Apps? 
> I know for things like a kernel and very low level stuff, it is still
> the number 1 choice.  But what about apps in general?  One of the
> biggest arguments that I hear for using C is that it's fast.  With
> machines becoming faster and faster and some of the security concerns
> around C, is C++ or Java a better choice. Is C that much faster then
> C++ and Java.  I know that some Java apps can take some time to load
> at first.  If it's already up and running, is it about the same as
> C++.  I'm not familiar with C++ or Java, although I had a class in
> C++.  The teacher was horrible and I really didn't get anything out of
> the class.  I have used C and do use it when the need comes.  I also
> hear people talking about using a scripting language like PHP, Python
> for the front-end/GUI and C for any heavy processing.  Does anyone
> have any experiences or insight on this?  I guess in the end looking
> in the future does it seem better to use C or some other language for
> app development.
> 
UNIX is founded upon C; remember that C was written for the purpose of
developing UNIX.  Also keep in mind that the more a compiler "does for you",
the less useful it becomes; you spend more time trying to defeat the built-in
"features" of the fancy language than you would spend writing the application
in a less-"featured" language in the first place.

Another thing:  There is *never* a security concern with a language that
doesn't try to be anything more than a programming language; any concerns about
security, etc. fall squarely in the lap of the *programmer*.  By the way, don't
bother me with this bit about "structured programming", which was the selling
point of COBOL, C++, and others of their ilk.  You can write gibberish in any
language; you should see some of the COBOL code with which I was assaulted in
days passed.  For examples of gibberish in English, I direct you to USENET and
IRC.

If you want blinding speed, write it in assembler.  The trouble with assembly
languages is that they are generally not too portable.  Enter Kernighan and
Ritchie.  If you need to run one-off or have something boringly simplistic for
which the traditional build cycle is just a bit much, write a script. Remember,
though, that awk, PERL, Python, etc. are not called "scripting languages" by
accident.  It's becoming a real pain in the ass to haul around a compiler *and*
six or seven interpreters to build and run everything that is to be run on a
daily basis.

Why are scripting languages so popular?  Two reasons:  1) They're "easy"
("easy" being relative; the Camel Book runs almost 1100 pages).  2) Look at
where a lot of Java, Python, etc. code goes:  A hell of a lot of it goes on
WinCrap systems, where a compiler costs a half a grand, and you *still* can't
do very much with it because you can't see inside the system to do anything.

Do you get the idea that I'm an advodate of C?

Hagbard

--
Only the madman understands the world.
It is because he understands that he is mad.

FnordNet  www.fnordnet.net



More information about the wplug mailing list