🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: rec.games.programmer
7 messages
7 total messages Started by Greg Bonney Wed, 22 Jul 1992 15:22
Pascal and C
#132
Author: Greg Bonney
Date: Wed, 22 Jul 1992 15:22
71 lines
3624 bytes
Mike Kienenberger SXMLK@ALASKA, SXMLK@acad3.alaska.edu writes:
>In article <1992Jul20.203317.10143@esds.mdc.com>, you write...
>>I still like Pascal.  Everybody says, "it was originally intended only to teach
>>people how to program".  And I say, "so what?"  C apparently wasn't "good
>>enough" in it's original incarnation either.  Otherwise, why did they have to
>>come up with ANSI C and C++?  And C does sacrifice readability in favor of
>>flexibility.  The C "for" statement is especially weird; it's completely
>>different from "for" statements I've seen in any other language.
>
>Sorry, I couldn't stand to leave you wallowing in your ignorance :-)
>ANSI C was created to make C "portable."  It really adds nothing to the
>language (and most of us C programmers still don't use the only thing it
>did add -- Pascal-like function declarations.)

First you say it "adds nothing", then in the same breath you say it adds
"Pascal-like function declarations"!  Is this the only thing about Pascal that
is better than K&R C?

Actually, there are other changes and additions.  K&R C recognizes only unsigned
int, whereas ANSI C recognizes unsigned short, and unsigned long also.  Under
K&R C, float is promoted to double when used in an expression.  ANSI C also
permits automatic arrays to be initialized.

(Just because my opinion happens to be a little different than yours doesn't
mean I'm ignorant.)

>C++ is an entirely different language.

Entirely?  I think not.  Any ANSI C program will still work in C++.  C++ only
adds features, it doesn't take any away.  If you want to call it a different
language, that's fine with me.  I, however, don't happen to agree with that
view.

>Just like Pascal++ will be if it's ever written.
>
>And while C may sacrifice readability in favor of flexibility, that flexibility
>is so powerful that we can live with the sacrifice :-)

That's okay with me.  Other people may not want to, though.  In the meantime,
we can only hope that somebody will invent a language that has the bennefits
of both C/C++ and Pascal.

>
>I wrote my first commercial product in Pascal (Turbo Pascal, if I remember
>right), but you couldn't drag me back nowdays.

I'm sorry, but I'm not impressed by the fact that you've actually written
commercial software.

>
>However, if you like Pascal, you might want to check out Ada.
>Strong typing for all you "long typing" folks.

I have checked out Ada.  I personally think it tries to do too much.

As far as "long typing" goes, if you have to write extensive comments
for code to be easily understandable, are you really saving on typing?
Of course, that depends on who's going to be reading your code.  If you
have a SQA group where you work, then you've got people reading your code
who don't program every day.  If other people have to maintain the code
you've written, you can't always assume that they're all experienced C
programmers either.  And I would maintain that it's pretty easy to write
C code that even an experienced C programmer would have trouble decifering.

>
>And, yes, the for loop does seem a little strange.

Boy, you really finished that argument off with a bang!

By the way, I like C.  But I like Pascal too.  Each has it's pros and cons.
Re: Pascal and C
#134
Author: David F. Skoll
Date: Wed, 22 Jul 1992 17:11
28 lines
1036 bytes
In <1992Jul22.152218.10624@esds.mdc.com> bonney@esds.mdc.com (Greg
Bonney) writes:

>Mike Kienenberger SXMLK@ALASKA, SXMLK@acad3.alaska.edu writes:

>>C++ is an entirely different language.

>Entirely?  I think not.  Any ANSI C program will still work in C++.

I don't think so.  C++ is not a direct superset of ANSI C - there are
a number of small incompatibilities.

Here's a fragment from an ANSI C program which won't work in C++:

typedef struct buddy {
   struct buddy *next;
   int age;
} friend;

typedef struct room {
   struct room *next;
   int chairs;
} class;

:-)

--
David F. Skoll
Re: Pascal and C
#140
Author: Greg Alt
Date: Wed, 22 Jul 1992 21:03
11 lines
616 bytes
>In article <1992Jul20.203317.10143@esds.mdc.com>, you write...
>Just like Pascal++ will be if it's ever written.

Shouldn't it be:
 
Pascal:=Pascal+1;

:-)
-
sig?
-
Re: Pascal and C
#143
Author: James Woodgate
Date: Wed, 22 Jul 1992 23:35
32 lines
1628 bytes
In article <1992Jul22.150304.2040@hellgate.utah.edu> galt%peruvian.utah.edu@cs.utah.edu (Greg Alt) writes:
>>In article <1992Jul20.203317.10143@esds.mdc.com>, you write...
>>Just like Pascal++ will be if it's ever written.
>
>Shouldn't it be:
> 
>Pascal:=Pascal+1;
>

:D
That made my day!

In my Data Structures class (could it have been 2 or 3 years ago???)
we were told that Modula-2 was Pascal++/Pascal:=Pascal+1.

I guess it never quite made it huh?

For the record, at the ACM programming contest a couple of semesters
ago, at UT, I think the top 5 teams wrote their programs in Pascal,
but I have a feeling they chose TP because of it's incredibly fast
compile time, most of the people there program in C normally.

I think just about every language has it's place, and I've never
beleived that there is or should be an "Absolute" best language
for everything, after all isn't that what Ada was supposed to be???


-- 
-----------------------------------------------------------------------
           -Linux Rules-                |
  -"I've been Dos free for 30 days      |
    now."-Former Dos Addict             | Address: woody@cs.utexas.edu
Re: Pascal and C
#162
Author: Sean Igo
Date: Thu, 23 Jul 1992 19:36
19 lines
1022 bytes
In article <1992Jul22.150304.2040@hellgate.utah.edu> galt%peruvian.utah.edu@cs.utah.edu (Greg Alt) writes:
>>In article <1992Jul20.203317.10143@esds.mdc.com>, you write...
>>Just like Pascal++ will be if it's ever written.
>
>Shouldn't it be:
> 
>Pascal:=Pascal+1;
>
>:-)
>-
>sig?
>-
And you've heard about the new object-oriented COBOL, too, right?

ADD 1 TO COBOL GIVING COBOL

--
SamHonk Xenubis
joke courtesy of Dr. Joseph Zachary and whoever he heard it from
Re: Pascal and C
#163
Author: Greg Bonney
Date: Thu, 23 Jul 1992 20:19
25 lines
2154 bytes
In article <l6rs6cINN8fh@priddy.cs.utexas.edu> woody@cs.utexas.edu (James Woodgate) writes:
>For the record, at the ACM programming contest a couple of semesters
>ago, at UT, I think the top 5 teams wrote their programs in Pascal,
>but I have a feeling they chose TP because of it's incredibly fast
>compile time, most of the people there program in C normally.
>
>I think just about every language has it's place, and I've never
>beleived that there is or should be an "Absolute" best language
>for everything, after all isn't that what Ada was supposed to be???

I'm a graduate of UM-Rolla.  I started there in '84, and that was the first
year that they started teaching Pascal as the first Comp Sci class.  Before
that, they taught Fortran (as far as I know, the engineers still take Fortran).
At the same time, Turbo Pascal 1.0 came out.  It was the first affordable
compiler (under $40 then) I'd ever seen on a PC, and its integrated environment
was absolutely revolutionary.  The compilation-time was incredible (thus it's
name - Turbo Pascal).  And executation-time was equally amazing to people who
were used to BASIC.  Before we came along, students at UMR had to do almost
everything on the IBM mainframe, and everything was batch.  Sometimes it took
hours to compile a program on the mainframe.  Now everybody uses compilers
instead of interpretters, so it becomes apparent that Turbo Pascal sacrifices
some execution speed in order to compile faster.  Consequently, some people
seem to think that Pascal inherently produces slow code.  That's not true at
all.  A good 2-pass optimizing Pascal compiler can produce very fast code.
But that just wasn't an issue when Turbo Pascal was first conceived.
Re: Pascal and C
#170
Author: Kevin C. Dorff
Date: Fri, 24 Jul 1992 07:35
15 lines
811 bytes
>>Just like Pascal++ will be if it's ever written.

>Shouldn't it be:
>
>Pascal:=Pascal+1;

Sheeeeez!  Nope!    

    Inc(Pascal)

Is the correct name for this language.
--

            Kevin Dorff
            kdorff@nmsu.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads