flatjs
flatjs copied to clipboard
Allow structures to carry non-virtual methods
The poster child for this is a Lock
structure with methods called acquire()
and release()
, to be reused inside other objects without needing a separate heap allocation.
In general this seems useful and unproblematic, even in the face of structure inheritance.
This will require a change to method invocation syntax, too, since it means allowing longer paths.