Alright, so here's something stupid I've always wanted to ask: Is there some kind of library/language/paradigm where instead of declaring what data structures you want to use, you declare constraints and expectations and it guesses the "best" one? So even if you're uncertain, you can say "I expect this collection to have about n elements", "this should be sorted", "I expect it to grow in a certain way", and so on (of course you might want to express much more advanced patterns).