Immutable objects

From Reia

Jump to: navigation, search

Since its inception Erlang has struggled to find appropriate mechanisms for defining user-defined types. The first attempt was records, a struct-like preprocessor feature which allows you to name the members of tuples. Records were often criticized for their ugly, unwieldy syntax and overall lack of power. Later, Erlang added parameterized modules which provide basic immutable object functionality but again, feel at odds with the core language and also underpowered.

Instead of parameterized modules, Reia provides immutable objects. These objects are similar to paramaterized modules, but allow standard OOP features such as constructors and inheritance.

Personal tools