Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: No call for Ada (was Re: Announcing new scripting/prototyping language)

Reply
Thread Tools

Re: No call for Ada (was Re: Announcing new scripting/prototyping language)

 
 
Ludovic Brenta
Guest
Posts: n/a
 
      02-07-2004
"Carroll-Tech" <(E-Mail Removed)> writes:

> I tell the students that I tutor that learning some Pascal or Ada
> would help them and they get scared. I mention doing a project in
> Ada and everyone looks at me like I'm out to punish myself. To me
> it isn't any easier to use C/C++, Java, Perl, Lisp or Prolog than it
> is to use Ada. How is it that Ada has this "super powerful", "super
> difficult", "there's not much call for it because it's too advanced
> and powerful" air about it when it's just another language? It's
> like saying that the machine code spit out of an Ada compiler has
> some mystical, magical properties that makes the Ada language more
> difficult to use.


I was thinking along the same lines last evening, and I came up with a
small theory that explains why so few pople can be bothered to learn
Ada. It goes like this: There are 3 types of languages.

The first type of language says "we're going to make programming
easy". Of course, this is a lie, because programming is inherently
difficult and no language can make it easy. These languages fake it
by being simplistic. Java is the most prominent member of this family
of languages; most scripting languages also fall in this category.
Beginners tend to flock to these "easy" languages and never learn
proper programming skills (like e.g. memory management. If some Java
"guru" reads this, ask yourself this one question: how many threads
does your program have, and please justify the existence of each
thread).

The second type says "we will let you do anything, absolutely anything
you want, and the power is in the hands of the True Programmers".
Languages in this category include, among others, C and C++. Many
people take a foolish pride in being called a True Programmer, and
therefore like these languages. I myself once was in this category: I
would show off my skills by writing a single-line program that nobody
else could read. But humans write bugs, and these languages don't
lend a hand finding these. Hence the famous buffer overflows.

The third type is what I would call the "zen master" type of
languages. They treat you like an apprentice, slapping you on the
hand each time you make a small mistake, and they scorn at you for
choosing the quick and easy path -- which leads to the Dark Side. If
you accept their teachings, you quickly become a Master yourself. If
you rebel against them, you will never achieve Enlightenment and will
always produce bugs. The "zen master" languages are Pascal, Modula,
Oberon, and, master of masters, Ada. The beauty of these languages is
that, once you are Enlightened, you can apply your wisdom to other
languages as well -- but often would prefer not to.

--
Ludovic Brenta.
 
Reply With Quote
 
 
 
 
David Rasmussen
Guest
Posts: n/a
 
      02-07-2004
Ludovic Brenta wrote:
> "Carroll-Tech" <(E-Mail Removed)> writes:
>
>
>>I tell the students that I tutor that learning some Pascal or Ada
>>would help them and they get scared. I mention doing a project in
>>Ada and everyone looks at me like I'm out to punish myself. To me
>>it isn't any easier to use C/C++, Java, Perl, Lisp or Prolog than it
>>is to use Ada. How is it that Ada has this "super powerful", "super
>>difficult", "there's not much call for it because it's too advanced
>>and powerful" air about it when it's just another language? It's
>>like saying that the machine code spit out of an Ada compiler has
>>some mystical, magical properties that makes the Ada language more
>>difficult to use.

>


I don't know. Ada rocks.

/David
 
Reply With Quote
 
 
 
 
David Harmon
Guest
Posts: n/a
 
      02-07-2004
On 07 Feb 2004 14:00:35 +0100 in comp.lang.c++, Ludovic Brenta
<(E-Mail Removed)> was alleged to have written:
>Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang. java


You damned crossposting troll, there is _no_ subject on-topic in all
those newsgroups.

See the welcome message posted twice per week in comp.lang.c++ or
available at http://www.slack.net/~shiva/welcome.txt

 
Reply With Quote
 
Robert I. Eachus
Guest
Posts: n/a
 
      02-07-2004
Ludovic Brenta wrote:

> The third type is what I would call the "zen master" type of
> languages. They treat you like an apprentice, slapping you on the
> hand each time you make a small mistake, and they scorn at you for
> choosing the quick and easy path -- which leads to the Dark Side. If
> you accept their teachings, you quickly become a Master yourself. If
> you rebel against them, you will never achieve Enlightenment and will
> always produce bugs. The "zen master" languages are Pascal, Modula,
> Oberon, and, master of masters, Ada. The beauty of these languages is
> that, once you are Enlightened, you can apply your wisdom to other
> languages as well -- but often would prefer not to.


I think you are on the right track. When I am programming in Ada, I
often spend most of a day coding. If I am exhausted at the end of it, I
will put off compiling until the next day. Otherwise, I hand all the
code to the compiler, and I am not surprised to be handed back dozens of
error messages. Fix the syntax bugs, and now I get twices as many
semantic errors. Kill all those and I am surprised if the test
programs--often written between the package interface and the package
bodies--don't run correctly.

For example, I recently finished writing a library of matrix operations
which works with "views" that may be a submatrix of an existing matrix,
and supports operations like Add(A,B) where the result is written in A.
That's a bit tricky, but the real complex one is Mult(A,B) where the
amount of temporary storage space for two N by N matricies is N. (A
buffer that stores one row.)

Why am I mentioning this? After all the coding I had a bug in the Mult
routine that the compiler didn't catch. A wrong subscript inside a
loop. (Why am I doing this? To submit as a new benchmark for SPECfp.
All that stuff is just scaffolding for implementing Strassen's algorithm
efficiently.)

Since I don't take what the compiler tells me personally, I love the
ratio of a hundred to one or so between compile errors and run-time
bugs. Some people though look at a list of compiler error messages as
if each one was a major failing on their part. Me? I could proofread
the code carefully, but it is easier to let the compiler find out where
I typed a comma for a period, and so on. And IMHO it would be nice if
the compiler found all the typos, not just most of them.

Could I write the same code in C, C++, or Java? Sure. It is just much
easier to let the Ada compiler do the heavy lifting part of the
debugging, so I would still write in Ada, then modify the code to match
the C, C++, or Java syntax. So to me, all that frequent hand-slapping
is a major benefit.

--
Robert I. Eachus

"The war on terror is a different kind of war, waged capture by capture,
cell by cell, and victory by victory. Our security is assured by our
perseverance and by our sure belief in the success of liberty." --
George W. Bush

 
Reply With Quote
 
MSG
Guest
Posts: n/a
 
      02-07-2004
Ludovic Brenta <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...

[...]

> The "zen master" languages are Pascal, Modula,
> Oberon, and, master of masters, Ada. The beauty of these languages is
> that, once you are Enlightened, you can apply your wisdom to other
> languages as well -- but often would prefer not to.



Can you do the following in Ada:

1. Write *one* bubble-sort function that will work on different
types given an appropriate comparison function

2. If B is a subtype of A, can you pass it to any function that
takes A as an argument? (covariance)

3. If B is a subtype of A, and FA and FB are functions accepting A
and B as arguments, can you use FA wherever FB could be used?
(contravariance)

4. If B is a subtype of A, is list/array/vector/set/etc. of Bs a
subtype of list/array/vector/set/etc of As? (covariance)

Unless you can show us how to do this in a way that will keep Ada a
"safe" (third category) language you say it is, I will not believe
that it's a "master of of the masters", I'm afraid.

If you answer "yes" to any of the questions, post *compilable*
snippets: we don't want to learn Ada just to verify your claims,
we simply won't believe you.

BTW, the esteemed Mr. E. Robert Tisdale (ER for short) isn't
letting on about why Ada isn't used much at NASA any more.
Perhaps *you* have an explanation?

MSG
 
Reply With Quote
 
David Rasmussen
Guest
Posts: n/a
 
      02-07-2004
MSG wrote:
>
> Unless you can show us how to do this in a way that will keep Ada a
> "safe" (third category) language you say it is, I will not believe
> that it's a "master of of the masters", I'm afraid.
>
> If you answer "yes" to any of the questions, post *compilable*
> snippets: we don't want to learn Ada just to verify your claims,
> we simply won't believe you.
>
> BTW, the esteemed Mr. E. Robert Tisdale (ER for short) isn't
> letting on about why Ada isn't used much at NASA any more.
> Perhaps *you* have an explanation?
>


So you have theories about Ada, but you don't really know it? That's
credible...

Just for the record: I am posting from comp.lang.c++.

/David
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      02-07-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (MSG) writes:
> If you answer "yes" to any of the questions, post *compilable*
> snippets: we don't want to learn Ada just to verify your claims,
> we simply won't believe you.


Feel free to post compilable Ada snippets in comp.lang.ada, but please
don't cross-post to comp.lang.c, comp.lang.c++, or comp.lang.java.
The last thing any of these newsgroups needs is yet another language
flame war. (I'm posting from comp.lang.c.)

I've redirected followups to comp.lang.ada.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
 
Reply With Quote
 
tmoran@acm.org
Guest
Posts: n/a
 
      02-07-2004
>4. If B is a subtype of A, is list/array/vector/set/etc. of Bs a
> subtype of list/array/vector/set/etc of As? (covariance)

What do you mean by a "set" being a "subtype" of another "set"?
 
Reply With Quote
 
David Starner
Guest
Posts: n/a
 
      02-08-2004
On Sat, 07 Feb 2004 14:00:35 +0100, Ludovic Brenta wrote:

> Of course, this is a lie, because programming is inherently
> difficult and no language can make it easy.


That's exactly what the assembly language programmers said about the
first Fortran compiler, and it's equally wrong now. Sure, there are cases
where you need to run DSP code and coordinate with the home base thirty
million miles away using one space-hardened 386, and that's hard. Then
there's the cases where you need two lines of shell to simplify moving
files around, and that's something assembly or Fortran or Ada or Java
would make much more complex then it is.

> (like e.g. memory management. If some Java
> "guru" reads this, ask yourself this one question: how many threads
> does your program have, and please justify the existence of each
> thread).


In the Jargon file, there's a story of a man who bummed every cycle out of
a poker program, even the initialization code, who spurned assembly
language because it was too inefficient. How would you explain your choice
of programming language to him? Who cares if there's a couple extra
threads running? You make a big deal about languages that protect you
against buffer overflows, why not use a language that protects you against
memory leaks?

> The "zen master" languages are Pascal, Modula,
> Oberon, and, master of masters, Ada.


Pascal is hardly usable, unless you use one of a dozen proprietary
extensions. That's hardly "zen master".

 
Reply With Quote
 
Nick Landsberg
Guest
Posts: n/a
 
      02-08-2004


David Starner wrote:

> On Sat, 07 Feb 2004 14:00:35 +0100, Ludovic Brenta wrote:
>
>
>>Of course, this is a lie, because programming is inherently
>>difficult and no language can make it easy.

>
>
> That's exactly what the assembly language programmers said about the
> first Fortran compiler, and it's equally wrong now. Sure, there are cases
> where you need to run DSP code and coordinate with the home base thirty
> million miles away using one space-hardened 386, and that's hard. Then
> there's the cases where you need two lines of shell to simplify moving
> files around, and that's something assembly or Fortran or Ada or Java
> would make much more complex then it is.
>
>
>>(like e.g. memory management. If some Java
>>"guru" reads this, ask yourself this one question: how many threads
>>does your program have, and please justify the existence of each
>>thread).

>
>
> In the Jargon file, there's a story of a man who bummed every cycle outof
> a poker program, even the initialization code, who spurned assembly
> language because it was too inefficient. How would you explain your choice
> of programming language to him? Who cares if there's a couple extra
> threads running? You make a big deal about languages that protect you
> against buffer overflows, why not use a language that protects you against
> memory leaks?


"Who cares it there's an extra couple of threads running?" you ask.
I do! I work on systems which are required to process thousands
of requests per second. Unnecessary threads (just because the language
makes it easy to create them), waste precious CPU cycles. (But that's
OT in c.l.c, I think).

If your last statement refers to Java protecting you against memory
leaks, then you have a surprise in store for you.
If it protects you against memory leaks why is there a need for
a garbage collector in the first place?
I have found many situations where the garbage collector did
not clear unused memory. The garbage collector is just as
buggy as any other code. (This is also OT in the c.l.c group.
and I don't want to subsribe to c.l.java



>
>
>>The "zen master" languages are Pascal, Modula,
>>Oberon, and, master of masters, Ada.

>
>
> Pascal is hardly usable, unless you use one of a dozen proprietary
> extensions. That's hardly "zen master".
>


--

"It is impossible to make anything foolproof because fools are so
ingenious" - A. Bloch

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded languages based on early Ada (from "Re: Preferred OS, processor family for running embedded Ada?") Colin Paul Gloster VHDL 48 04-10-2007 10:31 AM
Teaching new tricks to an old dog (C++ -->Ada) Turamnvia Suouriviaskimatta C++ 836 04-04-2005 11:33 AM
Anyone know anything named DX? (was Re: Announcing PyCs) (was:Announcing PyCs, a new Python-like language on .Net) Mark Hahn Python 22 09-09-2004 12:14 PM
Re: No call for Ada (was Re: Announcing new scripting/prototyping language) Ludovic Brenta C Programming 77 02-26-2004 02:36 PM
Re: Ada performance (was No call for Ada ) Joona I Palaste Java 0 02-15-2004 07:17 PM



Advertisments