[comp.lang.pascal] Anyone seen a good Amiga Pascal lately ? Why not Modula-2?

ncreed@ndsuvax.UUCP (Walter Reed) (04/02/88)

In article <2642@crash.cts.com> haitex@pnet01.cts.com (Wade Bickel) writes:
>duncanj@umd5.umd.edu (James Duncan) writes:
>>
>>What about those people FORCED to use Pascal for academic reasons.
>>Say your in a class and are permitted to use any computer but MUST
>>program in Pascal! Gee sorry Prof., but real programmers use C.
>>Sorry no-name generic student but real students program in Pascal or
>>they don't get a real grade in my all too real class.
I had the same problem in some of my classes...
>>
>>Pascal is the de facto academic language. With the emphasis on personal
>>computers these days often students are allowed to use any PC, but due to
>>grading standardization the students are required to program in Pascal.
>>
>>               Jim Duncan
>
>        You should see if your Prof. will allow you to use Modula-2.
>        Modula-2 is the successor language to PASCAL.  Both were created by
>Niklaus Wirth.  M2 is the derivative of Modual{-1} and PASCAL.  Modula was a
>systems programming language.  The result is a language which gives you all
>the niceities of PASCAL (well, most of them :^>), and the low level access
>PASCAL denied (which forced us to go to C, or assembly).
>        M2 is *VERY* similar to PASCAL, so for grading purposes it should not
>        be a burdon to the graders.  I can't see any reason a Prof. in his
>right mind would not encourage using M2, as it is a vibrant language, whereas
>PASCAL is a dead one :^>.
>                                                                Wade.
There are two major beefs I have with modula-2.
1.  Modula does not allow a variable number of parameters in function calls.
2.  Bitwise operators are not available (at least not standard.)
Minor beef:
    Begin end's required even when only one statment used.

Here is an example of why these things bother me.

Pascal:
	If (x = True) Then
		WriteLn('Error #',e,' in line #',l,' detected.');

Modula-2:
	IF (x = TRUE) THEN
		WriteString("Error #");
		WriteCard(e);
		WriteString(" in line #");
		WriteCard(l);
		WriteString(" detected.");
	END;

M2 is too verbose.

Now, Modula 2 could be fixed, and should be fixed.  Not having a variable
number of parameters makes compiler writing simpler, but makes writing  
programs harder, and more time consuming.  It may make debugging easier
though.  Now, modula-2 and pascal are both missing bit-wise manipulators.
What is needed:
	BAND	bitwise and
	BOR	bitwise or
	BXOR	bitwise xor
	BSHL	function to shift bits left (returns the shifted number)
	BSHR	function to shift bits right

That helps alot.  I had to write a microproccessor simulator in modula-2,
and the lack of bitwise operators made my life a living hell (along with
the problem of not having a variable number of parameters.)

Fix these design flaws and allow single statements to be written easier
and the language may even be usable.  Hell, I may even use it!
Borland could fix modula-2 like they fixed pascal.

Modula-2 should never be forced upon students, it's inhumane.


-- 
/* Walter Reed           UUCP  : uunet!ndsuvax!ncreed
                      Internet : ncreed%NDSUVAX.BITNET@CUNYVM.CUNY.EDU
Ph 701-235-0774         Bitnet : ncreed@ndsuvax  OR NU105451@NDSUVM1
------------------- */