I found that super useful in the AOC this year. :-)
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
case literallyAnythingElse

-
anthing, not anything :)
- Show replies
New conversation -
-
-
Huge thanks to
@li_haoyi for it
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Indeed! And it’s so useful!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Any performance implications of using that matcher?
-
I suggest you benchmark per use case, if it matters. If it's not the hot loop, it probably doesn't matter. I suspect it'll be more efficient than regex because it parses the string literally and only "thinks" more in the places where you have a placeholder (name).
- Show replies
New conversation -
-
-
does it support type hints?
-
Strings only I'm afraid
- Show replies
New conversation -
-
-
@lihaoyi added thisThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.