TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Carlisle Martin C Dr USAFA/DFCS <[log in to unmask]>
Reply To:
Carlisle Martin C Dr USAFA/DFCS <[log in to unmask]>
Thu, 5 Oct 2000 13:00:49 -0600
text/plain (51 lines)
>> There are lots of syntatical issues about switching from Pascal to C++
>> a C subset).  [for example....]

WES>These examples may be problems for the instructor, but not for the
>They are comparing Pascal and C++ as "first language" so the student will
>actually be switching languages.  (Unless they learned the "wrong" language
>in high school.)

I think Wes missed my point here.  I taught C for years at Princeton and
these were the problems the students had that they *would not* in Pascal or
Ada.  The programs look to the students correct, but aren't.

KEVIN>I'm very interested in the answer to this question; I've spent the
>last few years teaching Scheme to introductory CS students.  Some "get
>it", some don't.  I _don't_ think it has much to do directly with the
>language's syntax.

Kevin again points out to me later that the students aren't switching.  I
was well aware of this!  Actually my first CS course was in Scheme.  There
is very little syntax to Scheme and it does a nice job of levelling the
playing field.  I find that the distinction between those who "get it" and
those who don't is whether or not they can handle recursion, which seems to
be very hard for beginners.

KEVIN> C++ _does_ have explicit pass by reference, with a syntax much like
> Pascal.

Thanks for the pointer.  All the C++ I've seen tends to look like C, so I
wasn't aware of this.  Note that in Ada we commonly use "out" parameters, so
while I don't actually mention pass by reference, the syntax was very
awkward back when I taught C.

KEVIN> Certainly, but Pascal also has different operators for variable
>assignment (":=") and equality comparison ("=").

But the compiler catches the error!!!  That's my key point.  In Pascal or
Ada the compiler catches the error rather than the program just doing
something weird.

KEVIN>But my experience is that students learning C/C++ quickly learn where
>the semicolons go; while students learning Pascal are never quite sure.

This is a deficiency of Pascal, and is noted in the paper comparing Pascal
and Ada in the latest Ada Letters (which goes a long way to prove syntax