Code, rants and ramblings of a programmer.
Browse by Tags
Tagged Content List
Immutable isn’t just for parallel code
For the last 6 months the BCL team has been hard at work shipping an out of band release of immutable collections for .Net. Most recently delivering an efficient implementation of ImmutableArray<T> http://blogs.msdn.com/b/dotnet/archive/2013/06/24/please-welcome-immutablearray.aspx ...
2 Jul 2013
Immutable vs. Mutable Collection Performance
One argument I commonly hear against immutable collections is they are slow. I’ve held the opposite belief for some time but shamefully had yet to look at actual numbers on the CLR. Tonight I decided to change that by benchmarking one of my immutable collections against a mutable collection...
6 Apr 2009
Why are thread safe collections so hard?
Writing a collection which is mutable, thread safe and usable is an extremely difficult process. At least that’s what you’ve likely been told all through your schooling. But then you get out on the web and see a multitude of thread safe lists, maps and queues. If it’s so hard, why are there so many examples...
11 Feb 2009
Immutable Collections and Compatibility with Existing Frameworks
When developing my immutable collections library , I spent a lot of time on usability. After all, if a library is not useful then what’s the point? A big portion of usability is being able to work with existing frameworks and technologies. For .Net and collections that means items like Data binding...
10 Dec 2008
A Lesson in Serialization
A few days ago, I recklessly added a [Serialization] attribute to a few of my immutable collection types. I needed to pass data between AppDomain's and adding [Serialization] was the quick and dirty fix. Compiled, ran and I didn't think much about it. Luckily I was updating some unit...
2 Sep 2008
ImmutableStack in F# Part 2
I'm a bit busier than I thought I would be after returning from vacation. But I had a little bit of time to play around with the implementation again today. Thanks to all the suggestions in the comments from the previous post . This version has a couple of improvements including Removing...
19 Aug 2008
Immutability and ReadOnlyCollection<T>
I am a huge fan of read only/immutable collections and data. Hopefully the increased exposure through the blogosphere alerted users to the advantages of this type of programming for the appropriate scenarios. I wanted to discuss ReadOnlyCollection<T> in case devs looking around in the BCL discover...
22 Apr 2008
Previously we discussed a multi-thread safe queue like data structure using locks as an internal synchronization mechanism. This time we'll look at a version requiring no locks. In the previous version, locks were used to synchronize access to an underlying queue which stored the data. Removing the...
3 Mar 2008
Tuples Part 7: Mutable Tuples
Part 6 left us with comparable tuples. At this point, the Tuple class is functionally complete. There will be a little more done with the debugability and overall fit into larger projects. But otherwise it is sound. Now the focus shifts to generating mutable tuples. Immutability...
23 Jan 2008
Tuples Part 1
A tuple in computer science can be described as a set of name/value pairs. In some cases it can be described as simply a set of values that are accessible via an index . Previously I discussed how to create a Tuple inside of PowerShell . This series will focus on the use of Tuples in DotNet and how...
3 Jan 2008
Page 1 of 1 (10 items)
© 2014 Microsoft Corporation.
Privacy & Cookies