-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
This
replaceAll "${d}/${m}/${y}" $ src *=~ [re|${y}([0-9]{4})-${m}([0-9]{2})-${d}([0-9]{2})|]
could be accidentally written as
replaceAll "${d}/${m}/${y}" $ src =~ [re|${y}([0-9]{4})-${m}([0-9]{2})-${d}([0-9]{2})|]
and it would pass the type checker, but behave differently.
The named captures were designed to work with the new operators, which can easily preserve the capture names in the definite result type — not so easy in the case of =~.
I can see three options for the 1.0.0.0 release:
-
leave everything as it is;
-
remove the old
=~and=~~operators from the API; -
fix them up so that when they yield
MatchorMatchesresults they preserve the capture names.
The question answers it self I think — we should do 3 of course.