Pascal: The Good, the Bad and the Ugly

As I posted before, I am teaching Pascal. I could discuss the relevance on teaching this language in this decade, but that is not my concern. I would like just to point The Good, the Bad and the Ugly I find in Pascal.

The Good: Pascal evolved and is a high level language. You have auto-growing strings (ok, with a size limit), you have arrays indexed by characters, integers or enumerated data types. That is good!

The Bad: Pascal syntax continues to be a mess. Begin and End keywords make the code big, the attribution with ‘:=’ makes it easy to type errors, and the low precedence of logic operators make me angry.

The Ugly: I can’t find a clean way to try opening a file without crashing the application. The only method I found (check the bottom of needs you to turn on and off compiler flags. That is annoying, stupid and decidedly too low level…