So I've come to Scala from C++, and while in general Scala's almost as good -- there's one gaping hole I have not been able to fill:
http://www.boost.org/doc/libs/1_49_0/libs/multi_index/doc/index.htmlWhich, I daresay is better than even sliced bread. [Disclaimer: if you're a scala programmer, I'd urge strong caution before using it -- as when you go back to scala you'll forever code with eyes turned skyward]. That said, do read the summary to get an idea of what it does. But in a nutshell it allows to to easily create collections, where you describe your use case (e.g. my situation right now: A collection of accounts, with efficient look via via two different criteria (id and username) while being able to traverse based on a date]. With multi_index, this simply comes together beautifully -- but in Scala, AFAICT my options are to either go through the huge hassle of creating/using an (in-memory) database and/or create my own specialized collection for this exact purpose (and spend the next day coding and testing it to make sure I main all the indexes properly etc.)
Actually, a better question: Is creating a generic solution like boost::multi_index even possible? (And if so, would anyone be willing to accept my genuine and undying gratitude for either taking a stab at it, or explaining how it could be done?)
Thanks a lot!
Eric