Using Extends: a question

Suppose I create a Text Extension called NthField, to work like String.NthField, but for Text:

// Extends t As Text, separator As Text, field As Integer Dim arr() As Text = t.Split(separator) If field - 1 <= arr.Ubound Then Return arr(field - 1)

What happens if a future version of Xojo finally adds an NthField method to the Text class. What happens to my code where I have been using Text.NthField as a Text Extension? Should I just rename my NthField Extension now to something else, like FieldN, to avoid this?

The compiler may report the ambiguousity or prefer the built in function.

I just tried it with my own Text.Left and it errors at build with a “more than one item” error, your will probably do the same if they implement it down the line.

I learned from Christian a long while back and name my extends as extendsFunctionNameTG, so yours would be

NthFieldTG(extends t As Text, separator As Text, field As Integer)

Or, for you -

NthFieldJS(extends t As Text, separator As Text, field As Integer)