Article View: rec.games.programmer
Article #207Re: TP or C ? (was: Languages to program in and ports and blah and etc...)
From: Stuart Woolford
Date: Mon, 27 Jul 1992 00:59
Date: Mon, 27 Jul 1992 00:59
73 lines
3382 bytes
3382 bytes
iuzzolin@carina.unm.edu (Harold Iuzzolino) writes:
>[Lots deleted]
>>
>>>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 ANSII 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.
>>
>>pity about the pascal code generation ( pascal is EASIER to optimize than
>>C, but no one (at least main-line compilers) seems to do it!!).compare
>>output of your favorite pascal compiler with the same ( functionally ) code
>>from MSC 6.0 (7.0??) or even watcom 9.0 ( with '486 code optimization ) and
>>you will see what I mean..
>>
>[Mac pascal nuked]
>>
>>also.. I just love the ability to use the_variable<<=3; instead of ( I think )
>>the_variable:=shl(the_variable,3);, which would not even be portable!!
>the_variable:=(the_variable shl 3)
>this is portable (at least to the amiga). I have done it, I have proof,
>I have programs that don't crash. I have also seen Stony Brook's Pascal
>(I own in it fact). It is pretty good (optimization blows me away), but
>I still like Turbo Pascal 6.0 better. As I already optimize my code,
>I don't need any compiler to do so. (So I don't get flamed): This does
>not mean that everyone can optimize their code. Yes it is nice to
>have a copmiler to do so. Yes C does nicely. However, if you guys
>are going to go with optimization and libraries...how about Fortran (Puketran
>to us)? That is optimized, portable, and has millions of libraries.
>(Ok, maybe not millions...but a lot). Turbo Pascal is still the best
>language (I consider it to be a different language to normal Pascal) I
>have ever used. The only problem with it is the compiler limitations.
>(i.e. that arrays have to be constant). As far as I can tell, this
>is the only thing that separates C from Pascal. On a final note,
>Pascal does have easier string handling and an ability to handle boolean
>functions.
>This is one nice thing about TP:
>function BoolTest(x,y:byte): boolean;
>begin
> ...
>end;
>begin
> if BoolTest(10,40) then InsertAnotherSpiffyProcedureNameHereIfYouWant;
>end.
>
well..I guess you beat C there.. in C you would have to go:
int BoolTest(x, y)
int x, y;
{
if(x==y) /* or whatever... */
return 1; /* or use TRUE, with stdio included.. */
else
return 0; /* or use FALSE, '' */
}
main()
{
if( Booltest(10,40) ) DoTheRealProgammerThing;
}
-------------------------------------------------------------------------------
stuartw@ccu1.aukuni.ac.nz
>>In VI Where Available<<
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<1992Jul27.005952.4167@ccu1.aukuni.ac.nz>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!aukuni.ac.nz!stuartwReferences:
<l1hmxkp@lynx.unm.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!aukuni.ac.nz!stuartw Newsgroups: rec.games.programmer Subject: Re: TP or C ? (was: Languages to program in and ports and blah and etc...) Message-ID: <1992Jul27.005952.4167@ccu1.aukuni.ac.nz> From: stuartw@ccu1.aukuni.ac.nz (Stuart Woolford) Date: Mon, 27 Jul 1992 00:59:52 GMT References: <l1hmxkp@lynx.unm.edu> Organization: University of Auckland, New Zealand. Lines: 73