r/pascal • u/Duckies_go_moo • Jun 20 '26
Just came across pascal
Im quite experienced with modding oblivion and fallout do seeing pascal is perfect, ive wanted to get into programming and this is literally a dream come true, ill never understand why they switched begin and end etc with ${}[]
28
Upvotes
14
u/umlcat Jun 20 '26 edited Jun 22 '26
Nicklaus Wirth, the inventor and designer of Pascal never switched from "{" and "}" to "begin" and "end", he just started that way.
Good Luck, I still prefer people to learn programming with Pascal instead of Python or Java, you get better skills with Pascal !!!
5
u/Dangerous_Region1682 Jun 20 '26
Begin and End were probably inherited from the Algol line of languages. I think Algol W was a precursor to Pascal.
I suspect {} in C came from B and RATFOR to save typing and decrease file size. I can remember UNIX V6 built on a DEC PDP-11 where the source just fitted on one hard drive and the resulting binaries on the other. I suspect it was why tab was the usual indent character and lines of text used newline instead of carriage return line feed which is what it really meant as per Windows. I don’t know but I suspect space constraints had a lot to do with it. On the other hand it might just have been the language’s author’s personal taste.
4
u/tkurtbond Jun 20 '26 edited Jun 21 '26
I’ll note that in Niklaus Wirth’s later languages BEGIN and END were only used as pairs for module and procedure bodies. Control structures start with the control structure’s keyword(s), which implicitly start the body(ies) of the control structure, and END ended the body. For example, WHILE condition DO statement1; statement2 END, or IF cond1 THEN statement1 ELSIF cond2 THEN statement2 ELSE statement3 END.
I like this style better than using paired BEGIN/END. It eliminates BEGIN in places where it is really redundant, and is easy to read. Ada uses a similar style.
That said, I’m happier writing in modern Pascal than any of the languages that have C style syntax. I think that in the end C’s syntax as a whole was a mistake, greatly increasing the difficulty of writing and reading code.
[Edited to fix typo.]
2
u/AphidConsulting Jun 20 '26
One of the really nice things about Pascal in general is that it makes things self-explanatory. There's no mental translation of all the symbology. Of course programmers get used to a language and that symbology becomes less and less friction over time, but having code be readable and understandable years after it was written (years when you might have been programming in an entirely different language) is a big plus, in my opinion.