proj-plbook-plChPascalOberonLang

Table of Contents for Programming Languages: a survey

Pascal and Oberon

Because of its historical popularity, its importance as an exemplar of a style of computer language, its readability, Pascal gets its own chapter. Because it is a successor to Pascal, and because of its minimalism, that chapter is also about Oberon.

The designer, Wirth, is known for an emphasis on simplicity [1] [2] [3] [4] [5].

Oberon

Goals: "...The language Oberon was born out of the ambition to simplify language to the essentials....Tempted to design a version of Modula stripped down to essentials, we also wanted to identify those features that were indispensable to encompass object-orientation" (cite http://www.swissdelphicenter.ch/en/niklauswirth.php )

Pros:

The minimal extensions present in Oberon for OOP are:

Oberon already has first-class functions, so 'methods' may be implemented manually by assigning function values to fields of a record.

People: Niklaus Wirth

Types: Basic types (boolean, char, integer, real, byte, set), arrays, records, pointers, procedures

Retrospectives:

Misc notes: "its successors Modula and Oberon are much more mature and refined designs than Pascal. They form a family, and each descendant profited from experiences with its ancestors....Why, then, did Pascal capture all the attention, and Modula and Oberon got so little? Again I quote Franz: "This was, of course, partially of Wirth's own making". He continues: "He refrained from ... names such as Pascal-2, Pascal+, Pascal 2000, but instead opted for Modula and Oberon". Again Franz is right. To my defense I can plead that Pascal-2 and Pascal+ had already been taken by others for their own extensions of Pascal, and that I felt that these names would have been misleading for languages that were, although similar, syntactically distinct from Pascal. I emphasized progress rather than continuity, evidently a poor marketing strategy. ... But of course the naming is by far not the whole story. For one thing, we were not sufficiently active -- today we would say aggressive -- in making our developments widely known." -- http://www.swissdelphicenter.ch/en/niklauswirth.php

As of this writing, the latest in Wirth's Pascal/Modula/Oberon family of languages. Latest version as of this writing: Oberon-7

Tutorials:

Links:

Oberon the language is part of an entire computer system, Project Oberon:

Oberon-07 is also used in the Astrobe system for programming Cortex M boards [7] [8].

Opinions:

Oberon implementations and variants

" The linage is more or less as follows:

Oberon => Oberon-2 => Component Pascal

                   => Active Oberon
                   => Oberon.NET => Zonnon
       => Oberon-07 (multiple iterations until 2016)

From features think Go (Oberon), D/C# (Active Oberon).

Active Oberon provides features for manual memory management (untraced references), async/await (active objects hence the name), lightweight generics, interfaces, exceptions. " -- [13]

Pascal

Goals: "The general idea dominating the design of Pascal was to provide a language appealing to systematic thinking, mirroring conventional mathematical notation, satisfying the needs of practical programming, and encouraging a structured approach" (cite http://www.swissdelphicenter.ch/en/niklauswirth.php)

Criteria:

Historically important innovations:

Attributes:

Cons:

Features:

Influences: Algol, Fortran, Cobol ( http://www.swissdelphicenter.ch/en/niklauswirth.php )

People: Niklaus Wirth

Retrospectives:

Opinions:

Pascal Variants

Pascal-S

http://standardpascal.org/pascals.html

https://web.archive.org/web/20200803113748/http://standardpascal.org/pascals.html

https://web.archive.org/web/20200803113748/http://standardpascal.org/Wirth-PascalS.pdf "Original article introducing Pascal-S by Niklaus Wirth. Contains the complete, original source of the CDC 6000 version of Pascal-S."

https://web.archive.org/web/20200803113748/http://standardpascal.org/pascals.ins Pascal-S instruction set reference] "Document gives an explanation and list of the instruction set used in the interpretation of Pascal-S."

pascals.pas "Pascal subset compiler/interpreter, modified for ISO 7185 use. This file consists of the Pascal-S from Wirths' original article, with minor corrections to run on ISO 7185 Pascal (Pascal-S proceeded the ISO 7185 by at about 10 years). This is the file you want if you are going to compile and run Pascal-S! Don't worry, the changes made are well documented inside the source. You are very unlikely to get the original version to run without the modifications made in this version! "

" A brief overview of what is subsetted in Pascal-S:

1. Curly bracket mode comments are not supported. They are recognized and dealt with as an error, however (see "insymbol").

2. Subrange types are not implemented (type a = 1..10).

3. Scalar types are not implemented (type a = (one, two, three).

4. Sets are not implemented.

5. Files other than the "input" or "output" files are not implemented.

6. Dynamic variables (pointers) are not implemented.

7. Variant records are not implemented.

8. Gotos are not implemented.

9. The predefined functions succ and pred only function on type char.

10. Packing, the "packed" keyword, and the "pack" and "unpack" procedures, are not implemented.

11. "get", "put", and file buffer variable handling are not implemented.

12. Strings are unimplemented, except for literals as parameters to write/writeln, and those cannot have field lengths applied to them.

13. The "forward" specifier, and forwarded procedures and functions, are not implemented. " -- pascals.pas

Tiny Pascal

http://www.trs-80.org/tiny-pascal/

" Tiny Pascal was a subset of the programming language Pascal. It contained most of the features of Pascal but was small enough to run well on a cassette-based TRS‑80. "

" The first version of Tiny Pascal appeared in a three-part series of articles in BYTE titled “A ‘Tiny’ Pascal Compiler.” They were written by Kin-Man Chung and Herbert Yuen and appeared in the September, October, and November 1978 issues. Those articles were also later published in The BYTE Book of Pascal that was published in 1980.

This version of Tiny Pascal was written in North Star BASIC. According to the articles, it implemented most of Pascal with some limitations:

    the GOTO statement was missing
    only integers and one-dimensional integer arrays were allowed for variable types
    there was no “structured data type, pointer type, user defined type, and file type”
    parameters were passed by value only

On the other hand, Tiny Pascal did add some extensions to standard Pascal, such as else clauses in case statements. "

Dynamic Pascal

Demo for LibJIT? code generator.

https://www.gnu.org/software/libjit/doc/libjit_3.html#Tutorials

Free Pascal

Free Pascal tutorials:

Object Pascal and Delphi

Delphi was a much loved IDE https://en.wikipedia.org/wiki/Delphi_(software)

"Delphi was good but a compiled language with manual memory management. It was very easy to write code that crashed, which would nuke the user's state leaving little evidence of what happened. It also had a lot of legacy quirks like not allowing circular dependencies between compilation units, networking support was poor (iirc TCP, HTTP and other classes required you to buy a third party library). The VCL was a wrapper around Win32, which had some great strengths but also really frustrating weaknesses e.g. extremely poor/non-existent layout management, poor support for typography and no support for styling or branding. There were many positive aspects of course." -- Mike Hearn

(the whole comment is interesting too:

"

The language and libraries situation on Windows wasn't great during this time.

Delphi was good but a compiled language with manual memory management. It was very easy to write code that crashed, which would nuke the user's state leaving little evidence of what happened. It also had a lot of legacy quirks like not allowing circular dependencies between compilation units, networking support was poor (iirc TCP, HTTP and other classes required you to buy a third party library). The VCL was a wrapper around Win32, which had some great strengths but also really frustrating weaknesses e.g. extremely poor/non-existent layout management, poor support for typography and no support for styling or branding. There were many positive aspects of course.

Microsoft gave you VB or C++, both with Win32 again. The C++ developer experience was horrid. VB was at least a scripting language with garbage collection, but, it was also constrained by the fact that B stood for "Beginners" so Microsoft were very reluctant to fix any of its legacy or add more powerful features.

Compared to that situation, scripting languages and especially Perl had some massive advantages:

1. Ran on UNIX/Big Iron which is where all the best hardware and databases could be found. Lots of devs liked UNIX because it was CLI and developer oriented.

2. Unashamedly designed for experts with tons of powerful features, quality of life stuff like integrated regex, garbage collection, proper stack traces, error logs you could view via telnet within seconds etc.

2. CPAN provided an ever growing repository of open source libraries, instantly accessible, for free! On Windows there were very few libraries, they were mostly quite expensive and closed source, no easy way to discover them (pre-Google) and only C++/Delphi devs could write them. VB was sort of a consumer-only language. Open source culture started with RMS at the MIT AI lab and so was very UNIX centric for a long time. Arguably it still is.

Really, it's hard to overstate how revolutionary proper garbage collection + CPAN was. GC is a force multiplier and CPAN is the granddaddy of all the open source library repositories we take for granted today. Imagine how unproductive you'd be without them.

The big downside was that Perl had no UI libraries and didn't really run on Windows. So how do you use it to write apps for normal people? Then Netscape started adding interactivity features to the web and it was all totally text based. Text was Perl's forte! Add the <form> tag, CGI, HTTP and now you're cooking with gas. Bye bye hateful 0xC00005 Access Violation errors and useless bug reports like "I clicked a button and the app disappeared".

The web was a huge step back for users, who went from having pretty sophisticated GUIs with fast table views, menus, shortcut keys, context menus, Office integration, working copy/paste, instant UI response etc to ... well, the web. But often users will suffer through that if it makes their devs more productive because all they really care about are features and competitive advantage. The web was crude but it let people escape the Windows ecosystem to one with open source + GC + pro languages + big iron UNIX. " -- Mike Hearn )

PL/0

https://en.wikipedia.org/wiki/PL/0

"a Pascal-like language, also developed by Niklaus Wirth, that was developed specifically for teaching compiler construction. " [22]

Implementations

Modula-2

Discussions of the advantages of various recent Pascal-lineage languages

" Oberon had several dialects as well, e.g. Active Oberon (experimenting with concurrency), Object Oberon (OO), and Zonnon (transporting the "spirit" of Oberon onto Microsoft's .NET platform). However, these are mostly dialects, not true successors. The mainline successor is Oberon-2, a superset of Oberon, incorporating OO features based on experiences with Object Oberon. The successor to Oberon-2 (despite its name) is Component Pascal. Component Pascal is still actively maintained by Wirth's group at ETHZ. " -- https://retrocomputing.stackexchange.com/questions/21722/what-happened-to-modula-2

Pascal Links