[Oberon] Functional programming and Oberon

Diego Sardina dsar at eml.cc
Fri Dec 16 08:34:12 CET 2016


 > These days I see, every programming language is behind
 > functional programming!

It seems that if a programming language doesn't introduce new
features every X years, the language is obsolete and not worthy
of consideration.
It's the modern trend to add functional features to imperative
programming languages, a trend that I would never follow.

 > How far is Oberon from functional programming?
[...]
 > But only thing we need is: a way to preserve dynamic state
 > of a procedure and unnamed procedures!

Why do you want these functional features?
Mixing the two increases language complexity and redundancy,
basically you have two constructs to solve the same problem:

1) A closure that is a function which operates on his own
(dynamic) lexical scoping (that is a record); and
2) A method that is a procedure which operates on his associated
object (that is also a record).

If you look closely they are very similar (if not the same).

 > I got interested towards functional programming,
 > reading that it favors concurrency and
 > avoidance of mutation is the future...

In imperative languages it is a good practice to offer an
immutable representation of a data structure. It's not that
big effort.


--
Diego Sardina



More information about the Oberon mailing list