[NTLUG:Discuss] Linux Programming Classes??
Steve Baker
sjbaker1 at airmail.net
Tue Jul 1 18:32:00 CDT 2003
I hate getting dragged into Language Wars - but this Ada love-fest
make me deeply ill - it CERTAINLY doesn't represent the views of the
vast majority of programmers who had to suffer through it.
Darin W. Smith wrote:
> Think of it as a C compiler being set to interpret all warnings as
> errors, and just for good measure throws in lint in its entirety.
Like "g++ -Wall -Werror" ?
Every good realtime programmer I ever met who worked with Ada agreed that it
was a HORRIBLE language and were glad to see the back of it. It 'nannies' you
- which is OK if you make a lot of trivial errors - but acts like a strait-jacket
once you know what you're doing.
C/C++'s warnings are warnings for a reason. It's because they aren't ALWAYS
solid indications of some fatal problem with your code - they are just
suspicious little things you might care to be reminded of. Things that are
DEFINITELY problems and cannot possibly be correct are errors as they should be.
When you have a language where everything HAS to be an error, there is no
scope for the compiler to give you ADVICE. Things like potentially uninitialised
variables for example...these are often indications that you've made an error,
but other times, you didn't initialise the variable because you KNOW it doesn't
need to be initialised and you want to save a machine cycle by not initialising it.
If the compiler has to ERROR for that condition then it forces every variable
to be initialised even when that's utterly redundant and happening in some
utterly time-critical loop somewhere.
So - when you have poor programmers, Ada catches their little boo-boo's and
slaps them on the wrist for it - but when you have a really good programming
team, it's like programming with lead weights strapped to your wrists.
Heck - I even sat on one of the committies that designed Ada (The "Ada Telecoms
Access Committee") - it was the worst case of 'design by committee' that I've
ever come across. Every 'language lawyer', 'abstract programming language
expert' and god knows what came out of the woodwork - and everyone wanted
their pet ideas crammed into Ada. It was a deeply horrible experience.
YUK, YUK, YUK!!!
> Best Ada story I have? Years after leaving the defense industry, I was
> working at a telecom startup with more than a few former defense
> workers. In a code-review of some of my code, I'd made a subtle C++
> error (I can't remember what--probably a strange cast that the compiler
> allowed but would give an undesired result). I commented that C++ was a
> hideous language for allowing me to even do that. A friend of mine
> (realizing my thought pattern) then polled the reviewers: "Who here
> wishes this project was written using Ada?" The vote was unanimous in
> favor of Ada amongst all those who had been exposed to both languages.
Geez - you know some *sick* people.
When the 'Ada requirement' was dropped for military work, we *partied*.
C++ is like driving a Porsche - it's fast, responsive and does EXACTLY
what you tell it. Ada is like driving a Volvo Estate wagon...safe, boring,
it'll get you there eventually.
Don't give a novice a Porsche - but please don't make race-drivers drive
a Volvo Estate.
Ada might have had it's place in applications where lives were at stake
and utter, mind-numbing correctness was a real need - but for people doing
realtime systems where every last drop of compute power needs to be squeezed
out, you can't beat C and C++ - which is why they have come to overwhelmingly
dominate the world of programming languages in the last 20 years.
If Ada is so great - how come people left it in droves at the very first
opportunity? How come Linux (which post-dates Ada) isn't written in Ada?
Look at SourceForge - 11,189 projects using C, 10,915 using C++, 67 using Ada -
heck there are more project written Zope than Ada! Those few Ada projects that
there are are ALL there as Ada support tools - none are just 'general' software
packages written in Ada because it was the language the developer preferred for
the job.
There is a reason for that - programmers know their craft and have honed their
tools - the theoreticians and lawyers who forced Ada down our throats didn't
know a damned thing about practical programming and their design for Ada
reflects that.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1 at airmail.net> WorkEmail: <sjbaker at link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----
More information about the Discuss
mailing list