PowerCollections for V2.0 RTM

Peter just posted a version of the Power Collections for V2.0.   I’d love to hear your feedback on these and the general model.  Our goal with helping out Peter and Wintellect with power collections was to provide a first class extension of the existing collection classes that developers could use to take full advantage of the platform. 

Do you think we meet that goal?  Would you use Power Collections in your next application?  Would you like to see other PowerXxx classes?  Such as PowerMath or PowerIO? 

Or would you rather us focus on doing only what we can inside in the constraints of shipping as part of the .NET Framework and WinFX?


Thanks for your feedback.


10/16/2006 Update: I updated the link to the correct site

Comments (17)

  1. TAG says:

    Was it funded by Microsoft project ?

  2. Chris Nahr says:

    The Power Collections project is interesting but I would never use this library due to its bizarre "Shared Source License".

    So any effort you put into PowerXxx projects is wasted from my perspective, unless you change to something sane like the MIT license.

    Unless you do that, I would prefer you put the effort into improving the .NET Framework and other official libraries.

  3. barrkel says:

    The PowerCollections library has a noxious licensing clause, IIRC, about being impossible to use with open source / free software. Even though I don’t write open source software, I can’t limit my options for the future, so such a library is out of the question.

  4. BradA says:

    Barrkel and Chris — thanks for your feedback on the license… this is helpful.

    TAG — yes, we put some money into it as well as time from folks like Anders Hejlsberg and other product team members.

  5. kfarmer says:

    I’m perfectly happy to see PowerCollections folded into the Framework. Same with a PowerIO and a PowerMath class.

    One of the great successes of Python was in having a very rich Framework out of the box. I think PowerFoo can serve that end for .NET, but to greatest effect only if packaged with the main framework for both visibility and standardization.

    Having to go through and download yet-another-implementation-of-the-wheel is one of the pains I’ve encountered in dealing with Java projects. I’d rather not have to do that.

    Wishlist re Math: Physical constants library and some sort of dimension-safe-at-compile-time units framework. That way I could say that not only is some value a double, but that it’s a Length, or that it’s a Mass, and that this funtion takes Speed, which is the same as Length over Time, etc. One could do this at runtime (I’ve written as much), but true compile time safety of this nature would require some work on the compiler and CLR to add value parameterization.

    struct Unit<T><NLength, NTime, NMass, NCharge, …>

    struct Speed<T> : Unit<T><1, -1, 0, 0, …>

    struct Unit<T><int NLength, int NTime, int NMass, int NCharge, …>


    Unit<T><NLength – nLength, NTime – nTime, NMass – nMass, NCharge – nCharge, ….>

    operator/(Unit<T><nLength, nTime, nMass, nCharge, …> divisor) { }


    var Meter = new Unit<double><1, 0, 0, 0, …>(1);

    var Second = new Unit<double><0, 1, 0, 0, …>(1);

    var SpeedOfLight = 300000 * Meter / Second;

    This also leads to compile-time safety for fixed-size matrices, also a math goodness.

  6. Hi Brad,

    I didn’t know Microsoft went as far as paying for some of this stuff. While you were at it, why wasn’t the effort done internally? BCL is sorely lacking in the department Power Collections are covering and if it weren’t for Power Collection I’d probably have to roll some of my own, which is insane in 2005 (all of the collections and algorithms were present in C++/Java for quite some time).

    I like that at least something is available and appreciate the effort guys from Wintellect put into it. The library seems well designed (we’ll see how well it is implemented once I start using it more seriously).

    That said, you should know that many, many developers will simply not use it because it’s not "official" Microsoft stuff (is not part of BCL) while many would probably use it if they knew it existed (thus it is good you’re writing this, some might discover the lib through this post).

    Personally, I think that Microsoft should have done the Power Collections and have richer containter classes/algorithms in BCL. However, if this is the only way we can hope to get some stuff out of the door due to buirocracy in Microsoft, then by all means "outsource" other pieces of BCL. I’d still prefer Microsoft doing the work, not because I fear the quality of work of external companies, but because of the issues above – discoverability and "officialness".

  7. Juan Felipe Machado says:

    Aside for the licence, which I have already complain to in Peter Golde’s blog, I think Power Collections are awesome. I’ve been using it for the last 6 months or so and now I can’t stop using it, if feels like part of the BCL itself and that’s great. I really apreciate you guys putting effort on this project and I’m really loking forward for more power stuff (specially Power Threading… any news on this project??)

  8. I’d have to agree with some of the other comments: why doesn’t this come directly from Microsoft?

    I’d be *MUCH* more likely to take it seriously if it was in a Microsoft.<something> namespace and available as a MSDN download.

    Either that…or get the guys a boost.org to take it over 🙂

  9. Alexander says:

    I would really like to use this, but it looks like clause B (the anti-GPL clause) is still hanging around the license. I’d rather just roll my own classes as I need them than limit what other people can do with my (research-oriented) code once I make it freely available.

  10. staceyw says:

    Yes I would like PowerMath and PowerIO. Math should get BigInteger so don’t have to rip it out of Mono. This would kinda look like a "Fedora" deal where community adds function and eventually MS picks the best stuff and adds to BCL.

  11. JD says:

    I’m not sure i understand the other comments.

    Why is Power* any different from Boost* libraries? A good library is a good library, and is all about not rebuilding a wheel (especially one done better).

    For the licensing, is GPL the only concern? Many licenses aren’t GPL-compatible. Not even the whole BCL is GPL-compatible, though Rotor and Mono show that a subset can be replicated. If you don’t like the terms of the license, do as Mono does and copy the API surface.

    Is it that those interested are in more of an academic environment? I genuinely don’t understand the antipathy.

  12. kfarmer says:

    Not being one of those who cares about OSS licensing (I’m wistful for the simple "public domain" days), all I can comment on is the desire to see Power Collections assume a more prominent position as a proper member of the BCL.

    It makes the BCL richer, helps promote standardization (the roll-your-own instinct leads to disasterous balkanization), and removes any excuses people have for not knowing what it is or where to get it. Any, that is, except for "Haven’t tried that part of the namespace .. yet!".

  13. Matthew Watson says:

    I’m already using PowerCollections in some of our projects. Coming from a strong C++/STL background, I can see huge utility in these PowerCollections.

    Having it as part of the "official" class libraries would be most welcome – and any additional PowerX libraries would be equally welcome!

  14. Salim says:

    I agree with lot of people here that there shouldnt be any added licesning restrictions in using this code. It should be avialble as .NET BCL

  15. Darren Neese says:

    to me, the license doesn’t seem too bad…(of course, this is all subjective)… It would be great if it was MIT or in the BCL, but between a take it or leave it, I’ll take it.

    Adding more to my thoughts concerngin the license, it seems that it wants to restrict you from combining or having its license overridden by another’s license, in the case of combining…

    …why does it have to be combined? why can’t it be a library that is uesd? There may be an issue I’m not thinking of.

  16. Joannes says:

    PowerCollections are great. Too bad that there is such a bizarre licence that prevent any free/open source distribution. It’s preventing me to actually use such good tool.

    I do not understand how does it make sense for MS? Why having a more restrictive licence for the PowerCollections than for the .Net framework?

  17. Power Collections look very good, I think I might use them for my next application, but,..

    I’d also be scared of the non-standardization issue. I’m a freelancer in a certain company. Sometimes I take the whole projects, and sometimes I only take that certain part. So, I need something that won’t confuse other developers when they look at it. SAme for the out/in the box issue.

    A great example on that all would be MS Enterprise Library. It’s done by MS and as a community project; It’s standard enough to work with and recommend, and, when the next version of the framework ships, I know it’ll include most of the current Ent. Lib. features. This already happened with En. Lib. and .NET 1.x and 2.0. I think this is the best model ever!