[Oberon] Functional programming and Oberon

Richard Hable informujo at aon.at
Sat Dec 17 14:35:52 CET 2016


Am 2016-12-15 um 23:35 schrieb Robert Ransom:

>> Without generics (i.e. type parameters for functions, types, and values)
>> it is not possible to define reusable persistent collections. We can't
>> just build and manipulate aribitrary pointer structures.

> Type extension is sufficient.  A collection module can allow its
> client modules to allocate extensions of its own Entry record type, or

But then one can not store values of arbitrary types in the collections,
only specially created ones inheriting from the collection entry base type.

> it can operate on keys and/or values of type Objects.Object.

There is no generic Object type in Oberon (and Trankvila); for good
reasons! Using such a "garbage" type takes away the advantages of static
typing.

And in both solutions a lot of type casts at runtime would be necessary.

Richard



More information about the Oberon mailing list