@neauoire Say you want to implement substring matching. How do you make sure it doesn't need to know about the in-memory layout of strings? Like, how will it work on both arrays and ropes?
You need to dispatch on the type of an argument at *some* point, either at compile time or at run time.
And sure, you can copy-paste the code, or reimplement it for each data structure, but human time is more important than computer time.
@csepp damn, I guess I never really had to solve that sort of thing, I'm not sure I understand what you're asking me in the first question.