
Modula-2 Reloaded – A Modern Typesafe and Literate Programming Language - networked
http://modula-2.info/m2r10/
======
zokier
The problem with Pascal/Wirthian family of languages in my opinon is that they
are really scattered and it is somewhat difficult for an outsider to discover
what is the currently alive variation. It doesn't help that the languages have
been called Pascal, Modula, and Oberon with various prefixes and (version)
numbers. Of course there are also various implementations of the different
languages that also kinda live their own lives.

Does anyone know some comperehensive and up to date resource illustrating the
whole language family?

~~~
pjmlp
> Does anyone know some comperehensive and up to date resource illustrating
> the whole language family?

I am not an expert, but as someone that started coding in the 80's I have some
of the knowledge myself. Some of these facts might be wrong.

Pascal:

Wirth created Pascal, the educational version, which was the target of the
famous rant from Kernigan.

All Pascal vendors extended the language, the most common extensions for
professional coding became the ISO Extended Pascal standard.

UCSD Pascal, Turbo Pascal, MacPascal and Quick Pascal were the most famous
dialects.

Wirth collaborated with Apple in the design of Object Pascal, the original
systems programming language for Mac OS. Those extensions were later on
adopted by Borland for Turbo Pascal.

Given the influence of Turbo Pascal in the PC world, most Pascal vendors
ignored the ISO Extended Pascal and tried to follow Turbo Pascal instead.

Object Pascal eventually became a synonym with Delphi.

Modula-2:

Wirth spends some time at Xerox PARC and gets to learn Mesa. When he returns
to Zurich, he creates a systems programing language based on Mesa, without the
issues that plagued Pascal and writes the Lillith OS in it.

Oberon:

Wirth returns to Xerox PARC, meanwhile Mesa has evolved into Cedar, a systems
programming language with RC/GC, interactive debugger (REPL) among other
features.

Again, when returning to Zurich, he creates Oberon (the language) and Oberon
(the OS), following the features of Cedar.

Oberon gets used as workstation environment at ETHZ and as a means to teach OS
programming at several european universities.

Wirth collaborates in the design of Oberon-2.

Other ETHZ collaborators create a startup to explore Oberon commerically and
extend Oberon-2 further, thus creating Component Pascal.

Meanwhile the OS projects at ETHZ evolve the Oberon OS into Oberon System 3
with its gadgets systems, and evolve Oberon-2 into Active Oberon, which uses
active objects as construct for parallel/concurrency programming.

Wirth already retired, decides to pursue his goals for a minimalist type safe
systems programming language and designs Oberon-07.

Modula-3

The Xerox PARC designers behind Mesa and Cedar eventually join DEC when all
falls apart and start designing Modula-2+, based on Modula-2.

With their learnings, they eventually create Modula-3 and the SPIN OS.

Unfortunately DEC gets bought by Compaq and Modula-3 related projects get
canned.

~~~
lobster_johnson
Good summary. It's worth pointing out that Borland's Pascal had already
diverged from other dialects, including Apple's, and when they tacked on the
OO extensions from Wirth's ObjectPascal/MacApp, they diverged further.

MacApp is interesting in itself, but I'm not sure how much involvement Wirth
had in its development. Delphi certainly owes a lot of its design to it, but
nailed the visual UI builder in ways that MacApp didn't (and in a way that
Interface Builder never has). Apple actually kept supporting and updating
MacApp as late as 2002 (Photoshop was famously written in it) [1]; it's one of
those beautiful niche things that eventually die, but keep a lot of people
magically productive for a while (just like Delphi, coincidentally).

[1]
[http://basalgangster.macgui.com/RetroMacComputing/The_Long_V...](http://basalgangster.macgui.com/RetroMacComputing/The_Long_View/Entries/2011/5/28_MacApp_-
_evolution.html)

------
brakmic
Don't want to be off-topic but just wanted to share the info about a Modula-3
project hosted at
[https://modula3.elegosoft.com/cm3/](https://modula3.elegosoft.com/cm3/)

They've also moved their sources to GitHub:
[https://github.com/modula3/cm3](https://github.com/modula3/cm3)

~~~
amyjess
I would dearly love to see a full-blown Modula-3 revival. It's one of these
old, moribund languages that I have a huge soft spot for, especially since I'm
a Pythonista and large parts of Python were lifted directly from Modula-3.

I also kind of have a thing for innovative languages that never really took
off. Not just M3, but I'm also deeply fascinated by Algol 68.

~~~
brakmic
I'm currently trying to compile the Modula-3 sources from GitHub. It's been a
long time since I have done this.

I'm fighting with the compiler because it refuses to compile under x64 arch.

Also, one must use an older m3-compiler to compile the newer sources. _sigh_

I think I should write a little tutorial for us, 80/90es kids (and older) ...
you know, nostalgia, mid-life-crisis etc. ;)

Regards,

------
11thEarlOfMar
Dr. Dobb's Modula-2 article, ca. 1991 (I worked for Multiscope at the time):

[http://www.drdobbs.com/whats-new-with-
modula-2/184408565](http://www.drdobbs.com/whats-new-with-modula-2/184408565)

------
frik
What's about the recent wave of Wirth's almost forgotten languages on HN?
Pascal, Modula and Oberon and its silbings/etc were pretty niche last time I
checked and most of their maintainer moved on.

~~~
clouddrover
I don't think Pascal is almost forgotten. Free Pascal
([http://www.freepascal.org](http://www.freepascal.org)) and Delphi
([http://www.embarcadero.com/products/delphi](http://www.embarcadero.com/products/delphi))
are both strong Object Pascal implementations. There's also Lazarus
([http://www.lazarus-ide.org/](http://www.lazarus-ide.org/)) which is a
Delphi-like IDE and libraries for Free Pascal.

------
Animats
It's a good idea, 20 years too late. We should have had this in 1995. At this
point, just getting programmers to write BEGIN and END will be a struggle.

Memory allocation needs to be addressed better. There seems to be a NEW, but
no mechanism for deletion. (Wirth did that in Pascal. It didn't work out
well.) Is this language garbage-collected?

For memory allocation, these are the known options:

\- Garbage collection (scripting languages, Go, LISP, etc.) - safe, but causes
stalls.

\- Reference counting - (Python) safe, but can leak if you have loops. Usually
adds overhead. May need a GC as a backup.

\- Single-ownership without borrow checking (C++11) - partially safe, errors
can be detected at run time, but this is not guaranteed.

\- Single-ownership with borrow checking (Rust) - safe, complicated at compile
time, but works.

\- Region allocation (Ada) - used in some real-time systems. Rare.

\- Manual deletion (C) - unsafe, leads to many bugs.

The manual option is probably unacceptable at this late date.

~~~
cbd1984
> Region allocation (Ada) - used in some real-time systems. Rare.

Equivalent to solving the halting problem unless you're writing toy software
with extremely well-defined inputs and outputs. Good for device drivers,
maybe, but not in the general case.

------
incepted
Whenever I read a Modula 2 source, I get the feeling the programmer is yelling
at me.

~~~
Animats
The upper case keyword thing is annoying. In ALGOL-60, the keywords were
supposed to be in lower case bold type. When algorithms were published in
Comm. ACM, they were, but computers printers and displays of the time couldn't
do that.

Displaying keywords in bold, and string constants in italics, would be a nice
editor feature today. It would look better than syntax coloring. If you had an
editor with enough smarts to line up the comments, you could even use
variable-width fonts.

------
mhd
Can someone point me to the documentation for their cweb-equivalent
(weave/tangle etc.)? Just interested if their definition of literate includes
"macros", or just the semi-literate stuff you see more commonly these days
(i.e. inverted comments, without restructuring).

Might also be just a fancy word for "we use begin/end, not braces".

------
woah
I wish they would show us some code.

~~~
jksmith
Very generally, think pascalish golang. Eschews heavy abstraction, lower
keyword count, green threads built in, modules instead of packages, no
implicit type casts, copious compile errors. It did not have garbage
collection, but I'm sure M2R10 will offer something in that area.

Topspeed made an awesome compiler and libraries for M2 back in the DOS days.
The package came with a cute traffic simulator demo showing off the
multitasking capabilities of M2. Logitech (yes, the mouse and keyboard guys)
was another vendor back in the day, along with Stonybrook (sweet
optimizations) and XDS, a Russian company which I believe wrote some M2 code
for the Russian space program.

------
eukgoekoko
> [http://modula-2.info](http://modula-2.info)

> Warning:
> include_once(/home/m2info/public_html/m2info/cookbook/rowspan55.php): failed
> to open stream: No such file or directory in
> /home/m2info/public_html/m2info/local/config.php on line 181

Looks really nice! Not to mention PASCAL-like semicolon-infected syntax with
mindblowing features like dynamic memory allocation and CASE OF. Who would
bother with this fossil crap?

~~~
jksmith
Yeah, no generics either.

~~~
jksmith
And no sense of humor either.

