May 2018 Archives

A new object system for Perl

I just released Dot, it's a new object system for Perl, some of its highlight and difference:
  • There's no code for this object system, you don't even have to install the module to use it.
  • An object is a hash, a method is a closure, and a class is a subroutine.
  • True private variable, not by pretending.
  • Multiple inheritance without the diamond problem.
  • Method dispatching takes zero time, in fact it is not needed at all.
  • The built-in mechanism of Perl 5 OO is completely bypassed.
  • If you want a bird you could inherit from a jungle …

About Yang Bo

user-pic I blog about Perl.