Pre-allocating an additional object for each RegExp match, when existing code does not use it, is likely to have some performance cost. Would it be OK to instead have an .offset() method (or start and end methods) on match objects, or is this too unergonomic?
Pre-allocating an additional object for each RegExp match, when existing code does not use it, is likely to have some performance cost. Would it be OK to instead have an
.offset()method (orstartandendmethods) on match objects, or is this too unergonomic?