close

The Pascal programming language

One of the most underrated and misunderstood programming languages

Pascal here means Free Pascal.

When most programmers think of Pascal, if they even heard of it, they think about an archaic language that was used for teaching a few centuries ago.

This is wrong.

Pascal is a very versatile programming language. It can be used from low level assembly hacking to building cross platform GUI applications. It has every modern features you might need: classes, units, interfaces, generics etc. While also having low level access, enabling you to do things that are impossible in most languages used today.

Why should you use Pascal

  • It's a compiled language, meaning you get true native performance akin to c.
  • It has a modern module implementation: Units. It's different than c/c++ includes in the fact that you only have to compile your units once, contributing to the point below.
  • It has blazing fast compilation, while equivalent c/c++ code can take minutes to compile, Pascal code will take seconds.
  • Extremely easy way to build cross platform GUI apps using Lazarus. It's literally drag and drop.
  • Clean readable syntax: Code is read more than it is written, being more readable, even if more verbose, is a Pro.

If you wan't to know more advantages, click here.

The main drawback

Pascal is one of my favorite languages and my default choice when I need native performance or GUI apps. However there is a main drawback in that it's not very popular.

Language popularity is an important factor. It means there are more libraries available and you won't have to write things from scratch. Also popularity means you're more likely to find your issues already answered online.

I will compare it to JavaScript, one of the most popular languages used today. Whatever functionality you might need, you're likely to find a node package for it, then just install it using npm.

In Pascal's case, while all the common functionality is available on the default libraries, more obscure functionality is harder to find or you will have to write it yourself.

Conclusion

Pascal, while not being very popular, is one of the best choices for building GUI apps or when native performance is necessary.

You can find very good guide for the language here. The author built an open source cross platform game creation engine using it. He knows the language inside out.

Install the Lazarus IDE to get started, you can download it here.

This site is a static site, and its generator and search programs are written in Pascal.

24/01/2020