Pascal with Terry

Why Pascal?



Performance: Is quite good,
Business type applications run almost as fast as c or c++. On the downside, Scientific and especially Trigonometric functions run about twice as long. Even so, a recent study on programming language performance and energy use consistently placed Pascal in the top 10 performers in many of their benchmarks. Taking the top position in the Sieve, quick-sort, the 2nd position for the Hailstone, and taking the number two position in energy use overall. In comparison to Python, Pascal does quite well, Python used about 35 times as much power and 24 times as much time as Pascal.

Article refered to: Ranking Programming Languages by Energy Efficiency Rui Pereiraa,b , Marco Coutoc,b , Francisco Ribeiroc,b , Rui Ruac,b , Jácome Cunhac,b , João Paulo Fernandesd , João Saraivac,

Programmability:

In Pascal when passing a variable to a procedure by reference, so that it can be changed in said procedure, a var needs to be placed in front of the variable in the procedure heading and other than that the variable can be treated normally. While in c and its descendent languages, the variable has to be passed as an address and than must be treated as a pointer. A large application may have hundreds, if not thousands of subroutines. An error is not only possible, but likely and can be very difficult to pin down. Pascal has pointers too, but are usually limited to working with linked lists and trees. This alone makes Pascal a better choice for niche applications. There are other trees versus the forest issues that can obfuscate c programs that should not appear in Pascal. I will confess that in extremely popular applications like LibreOffice, doing it in c++ will offer a better payback, but for a small company`s database application Lazarus and Pascal will reach a positive ROI much sooner.

Lastly, I would like to say that Pascal was designed to be a teaching language and therefore can be learned relatively easily. One should also be able to purchase used books explaining how to do many programming tasks either from a used book store or Amazon.