Is anybody coming from Pascal?

Edmund Strangely edmund at ngetal.fsnet.co.uk
Sat Jul 21 02:05:13 EDT 2001


Hello,

I've been lurking here for a while while working my way through 'Learning
Python'. So far only a few things have pissed me off with it. I was just
wondering, is anybody else coming from Pascal? Or Modula2/3? The book I am
reading kind of assumes that you are coming from C, and as I understand it
Python is written in C which is why it shares some of the same
conventions. Python is my first object orientated language. Pascal was my
second programming language (after BASIC on a spectrum) and although I
sort of learned C later, I still prefer Pascal. I personally like it more
than C for a few reasons. I don't think that I should have to worry about
how many bytes precisely my variables are stored in. (And I like BASIC
even better in this respect, in that integers and fp numbers are
automatically converted, and strings will grow and shrink as required (as 
in Python seemingly)). I don't like the fact that in Python if

>>>a=5
>>>b=2
>>>#and then
>>>c=a/b
>>>#then
>>>c
2

in Pascal if you *want* modulo arithmetic (which is not normally the case
) then you have DIV and MOD. I like having a distinction between functions
and procedures, for purely aesthetic reasons (I think having loads of
function names followed by () just looks ugly, procedures don't give
return values). Python only has functions, but I can forgive it that. But
the one thing above all that I think Pascal has over C (and which Python
shares) is that you can nest your procedures/functions! Most of my Pascal
programs had a mere few lines in the 'main' body of the program and the
rest would be large functions and procedures each with their own
sub-procedures and sub-functions with their own sub-sub units etc. When I
first started on C I just couldn't *believe* that you couldn't nest
functions, and just had to put them one after the other! You call that
structured programming?

I conclusion, and in reviewing this post, I seem to have been rambling a
bit (it's a bit late/early in the day) but I'd be interested to get a
response from anybody else who rates Mr Wirth, and in how any such people
finding the transition. I'd also be curious to hear from anybody who has
tried object Pascal.

-- 
                      Smash Bourgeois Revisionism!
               Edmund Strangely aka Bad Nail Varnish Boy
 'at all times he remained peculiar in presentation, and at one point
                    painted his finger nails black.'



More information about the Python-list mailing list