Red changing FIND/MATCH to not default to /TAIL

Historically, the /MATCH option to FIND has implied returning the tail of the matched region.

rebol2>> find/match "abc" "ab"
== "c"

That has been true despite the fact that there is a /TAIL option to FIND. In trying to make FIND more orthogonal I have questioned this decision.

Red has made the move to say you have to provide /TAIL with /MATCH, otherwise you get the head of the match. So now:

red>> find/match "abc" "ab"
== "abc"

red>> find/match/tail "abc" "ab"
== "c"

I can agree with the intent behind this, although I wonder if it should accompany a changing of the refinement name. /MATCH doesn't really fit with the meaning of "match" as I've been using it, e.g.

>> match integer! 10
== 10

>> match integer! <abc>
; null

So maybe something like FIND/AT or FIND/STAY or FIND/HERE...something along those lines. Then /MATCH could be deprecated in a more structured way.

But nope... they're pro breaking this for some reason. Who am I to argue, especially given that I wanted it changed anyway?

It does underscore that Redbol emulation will need Red and Bol modes. :frowning:

1 Like