You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
split takes a literal, non-empty separator because decode joins the parts back with that same separator. With a pattern, nothing records which text matched, so the join is not determined.
Decision: decline. Besides the undetermined join, a regular expression in a crosswalk is evaluated by a synchronous executor over document data, and JavaScript's engine backtracks: a crafted pattern can take super-linear work on a short input. Crosswalks are data the codec validates, and the command reads them from URLs (#48), so a pattern field would let a crosswalk author make every encode call arbitrarily expensive. Recording the matched separator per boundary would keep the round trip but not remove that cost.
Revisit if a real source uses a small set of literal separators: a split over a declared list of literal separators that records which one occurred at each boundary is invertible and runs in linear time.
The README reason for this omission is updated in #56.
Declined as recorded: a pattern split has no determined join and would let a crosswalk author make every encode call arbitrarily expensive. The revisit condition (a declared list of literal separators, recorded per boundary) stays in the body.
Activity
Mearman commentedon Oct 21, 2026
Declined as recorded: a pattern split has no determined join and would let a crosswalk author make every encode call arbitrarily expensive. The revisit condition (a declared list of literal separators, recorded per boundary) stays in the body.