TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Content-Type:
text/plain; charset="iso-8859-1"
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
Carlisle Martin C Dr USAFA/DFCS <[log in to unmask]>
Date:
Thu, 5 Oct 2000 10:52:54 -0600
MIME-Version:
1.0
X-To:
"Wisniewski, Joseph (N-COMSYS)" <[log in to unmask]>
Reply-To:
Carlisle Martin C Dr USAFA/DFCS <[log in to unmask]>
Parts/Attachments:
text/plain (65 lines)
There are lots of syntatical issues about switching from Pascal to C++ (even
a C subset).  The former "var" parameters are now required to be implemented
via pointers, since C does not support implicit pass by reference.

Certain C constructs like:

while (c=4) {
}

look fine, but are disasterous (note this is an assignment, not a comparison
[==]).  (You can do the same thing in an if statement).

Misplaced semicolons also wreak havoc.  For example,

while (c==4);
{
}

Now we've created an infinite loop!

The real problem is that these types of things are LEGAL C programs.  They
just don't do what you would expect at a glance.

There is an article in the most recent issue of Ada letters showing how a
Pascal-like subset of Ada had statistically better results than Pascal.
(The experiment was done at the US Military Academy at West Point).

--Martin

----------------------------------------------------
Martin C. Carlisle, PhD
Assistant Professor of Computer Science
US Air Force Academy
Managing Editor, ACM SIGAda Ada Letters
Opinions expressed herein are strictly those of the
author and not necessarily any organization.
-----Original Message-----
From: Wisniewski, Joseph (N-COMSYS) [mailto:[log in to unmask]]
Sent: Thursday, October 05, 2000 9:31 AM
To: [log in to unmask]
Subject: C++ as a first language


My wife teaches mostly C++ over at a major community college outside
of DC. (No it isn't quite as bad as Carville/Matalin at home although
this morning there was a discussion of "our individual opinions" wrt
readability of C++   :--)        )

Anyway, apparently there has been a switch recently from Pascal to
C++ for the intro class. The intro C++ is being taught without the object
oriented aspects of the language, so I guess it really becomes a
"C class using the non-object oriented constructs specific to C++ and
not in C, and using a C++ compiler",
from what I can tell.  The professors there are very concerned because their
students are performing much more poorly than they did with Pascal as an
intro language.

Now factoring out issues such as "teaching C++ for the first time" (which
maybe
is more important in all of this than the language) ..... well what are your
all
thoughts on this.

Joe

ATOM RSS1 RSS2