Open trombonehero opened 9 years ago
We could implement method binding a bit like Go:
foo:InterfaceName = struct { method = function(self:InterfaceName, x:int, y:int) { ... }; data = ... }; bar = foo.method(1, 42);
This would be extremely cumbersome without interface types (Issue #2), unless we reserved the name 'self' or 'this' and deduced its type...
We could implement method binding a bit like Go: