Goals of Modern Pascal:
This article explains MODERN PASCAL, not STANDARD PASCAL.
-code clarity, code reuse.
-code readability
-looks like a high level language but has the power of low level available.
-admission to the fact that humans can make mistakes, and that more errors
should be caught at compile and run time.
-hard to overwrite memory and buffers due to above.
-reads like paragraphs or blocks, and contains many words, unlike more symbolic
languages such as perl.
-capable of writing operating systems, CGI, executable programs, or even
interpretters. A powerful Army knife, not a specialized language like PHP.
-
Features of Pascal:
-Algol-like syntax (begin/end, :=, : ).
-Reserved words.
-Syntax for declaring new types.
-Constant declarations
-Type declarations
-Variable declarations
-Recursion.
-Procedure and function declarations
-forward declarations available, even if not used often
(procedures which can be used before they are defined)
-Body of program inside a begin/end. pair
-Code blocks inside begin/end; pair
-Some ordering requirements were relaxed in Extended Pascal and
TurboPascal, Delphi, Freepascal.
-Support for labels and goto, and non-local transfers.
-Simple I/O statements. FreePascal and Delphi contain many I/O
helpers beyond original Pascal I/O (input output,
commandline etc.)
-A Pascal program is written in a specific order which
encourages clean and precise code units. It also allows
the compiler to parse code much faster.
-Case insensitive. i.e. Yourvar is the same as YourVar.
Structure
Although the "structure" of a pascal program may sound restrictive to some, most
human beings end up coding sloppily when they do not have a program structure to
follow. And programmers will end up taking on different styles of programming too,
causing programs to appear different from one coder to another. Pascal is readable
from one coder to the other due to a general structure followed.
Case insensitivity
Generally after a program is running, programmers will clean up the code and make
variables consistent anyway, but minor case differences will not cause errors in
the program, unlike other case sensitive languages. This can help when you are
programming and wish to care less about minor case insensitivities, and worry about
those after you've got your program running.
Bondage and Discipline
Although some have termed pascal as a bondage discipline language, Modern Pascal is not at all. Even standard pascal, being case insensitive, is less bondage and discipline in that respect than other case senstive languages. Pascal is also not white space sensitive. Bondage and discipline is generally an overly used term, because one could consider Python's white space bondage and discipline.
As for Bondage and Discipline regarding types such as short strings - modern Pascal is nothing like standard Pascal with regards to limited 255 strings.
|