3 ms·
Parameterized modules don't have constructors. That doesn't matter in a trivial case, but it does when you want some complex state set-up which you don't want
by bascule 16y ago
Parameterized modules don't have constructors. That doesn't matter in a trivial case, but it does when you want some complex state set-up which you don't want to repeat every single time you "instantiate" a parameterized module?
Also, Reia has inheritance. Parameterized modules don't.
- deno 16y agoThey certainly do with -extends(). As for constructors… there's probably way around that too. Point is Reia's OO-revolution doesn't introduce any fundamental changes besides syntax.
- bascule 16y ago-extend() is another half-assed solution. It's closer to mix-ins than inheritance. Object orientation in Reia is baked into the core language itself. Like Ruby, all of its core types are objects. In Perl and Erlang they are not. Reia factors the core language types into objects, instead of amalgamations of the core types with arbitrary and poorly factored functions which act on them.