Hacker News new | ask | show | jobs
by davej 4069 days ago
From the video:

    function constructor(spec) {
      let {member} = spec,
          {other}  = other_constructor(spec),
          method   = function () {
            // accesses member, other, method, spec
          };

      return Object.freeze({
          method,
          other,
      });
    }
2 comments

That looks pretty interesting and flexible on one hand, on the other, I don't see why it's better than classes. Is it just more explicit?
Doesn't support inheritance.