I see this as ultimately being a much better from an optimization standpoint. Now I can change L to a set or a linked list if I find that more efficient without having to change it everywhere. Language features are no substitute for algorithm and data structure knowledge, which your students can likely be forgiven for not knowing about.
I don't buy it. Physically editing text is never the problem when changing a data structure like this. The work is ensuring your program is still correct and performs better.
Ensuring code is "still correct and performs better" is made easier if only the data structure used has to change to get "performs better", and the "still correct" comes free with it because the operation that performs the same function is the same operation regardless of the efficiency of the algorithm.
Right. And this kind of polymorphism means that your program will still retain the same correctness no matter what data structure you use. Physically editing text is the most correctness-destroying thing you can do.