[fpc-devel] Re: [fpc-l] type discussion

Michael Van Canneyt michael at freepascal.org
Thu Jun 2 15:36:11 CEST 2005

On Thu, 2 Jun 2005, Jamie McCracken wrote:

> Marc Weustink wrote:
>> What is easier to read is a matter of taste.
>> Being a pascal devel for years now, it takes time to "decode" a  "a := b
>> := c := d := 0"  line. There might be a ; inbeween which results in a
>> complete different assignment. With such lines I've to read them over and
>> over to see what is going on.
>> Where a line like "a := 0; b := 0; c := 0; d := 0;" is clear to me.
>> This also counts for the proposed c-isms.
>> For me I prefere clarity above less typing (besides if you want to write
>> realy short code, you sould use APL)
> I totally agree with you in this case - we dont want or need cryptic c stlye 
> syntax in any version of Pascal.
> However, in general Pascal has poor developer productivity when compared to 
> modern languages like python and C#. Ironically python is perhaps the most 
> popular language on Linux and most of its syntax is derived from object 
> pascal whereas pascal on linux is virtually non-existant. Of course Python is 
> piss poor in both performance and memory usage but it does point the way to a 
> revitalised pascal. Adopting less verbose but still clean and clear syntax 
> ala python is IMHO the way to make Pascal great again.

I beg to differ.

Recently I rewrote a python program (on linux). The pascal version was
shorter and much clearer to understand. The python syntax is a horror
as far as I'm concerned.

What makes python interesting are the many classes it offers by default
to perform standard tasks, especially in the text treatment department;
regular expression stuff etc.

The same goes for most languages; Mostly it's not the language syntax
that determines the productivity factor; it's the number of standard
available routines.

Quabbling about being able to type
is beside the question. If your productivity depends on that, you're
either in the wrong business, or you are using the wrong kind of editor.
A good IDE/Editor has tools to make typing less cumbersome.

In the company where I work, 4 languages are in use: Delphi, VB, C++
and PHP. In order of descreasing productivity they are rated as follows:
- Delphi
- VB
- C++
The order of VB/PHP was the most surprising for me; but that can maybe
be explained by the kind of app the language is used for.

Pascal is a language that allows you to develop in many styles, with as
much or as little optimization as you want, and all along it keeps your
code readable, which is very important when you work in team and you
need to read other people's code frequently. To see what I mean, try
reading this little 'gem':

int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0)
]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}

(better yet, run it)


More information about the fpc-devel mailing list