The main downside to the mixin approach is that mixins cause a global de-optimization in MoarVM. That's a bit costly, though perhaps not so costly as I/O itself. I wonder if not nulling the handle object, and then making sure that MoarVM gives a good error on all operations on a closed handle, might be a viable alternative?
The main downside to the mixin approach is that mixins cause a global de-optimization in MoarVM. That's a bit costly, though perhaps not so costly as I/O itself. I wonder if not nulling the handle object, and then making sure that MoarVM gives a good error on all operations on a closed handle, might be a viable alternative?