Browse by Tags
If you haven't visited stackoverflow.com yet I encourage you to take a trip. It's a great tag based newsgroup system. Check it out.
Read More...
The VB Catch syntax has a particular feature not present in C#: When. It allows users to filter expressions based on something other than their type. Any arbitrary code can enter a When block to decide whether or not to handle an Exception Sub Sub1()
Read More...
In my previous post I discussed creating an Option style construct for C#/.Net. This post is a followup with the complete code snippet. It’s been updated in response to several bits of feedback I received. Namely Option is now a struct
Read More...
F# has a handy method called Unfold. Think of it as the logical opposite of an Aggregate function. Aggregates take a sequence of elements and convert them to a single element. An unfold method will take a single element and turn it into
Read More...
Sorry for the terrible pun in the title. I wanted to blog about developing an F# style Option class for C# and I couldn't resist. The basics of an Option class are very straight forward. It's a class that either has a value or doesn't.
Read More...
Answer: When PInvoke is involved. I ran across a common error today on stackoverflow regarding P/Invoke that is worth blogging about. The question regarded the translation of a native API with a parameter of type LONG. The user mistakenly used the .Net
Read More...
Unfortunately when creating Live Search, the live team did not use a term which could easily be converted to a verb (i.e. google and google-ing). The term "live searching" doesn't really flow well in a hallway conversation nearly as well
Read More...
Problem #2 came quite a bit faster. The yield syntax in F# is very similar to the C# iterator syntax and made translating this sample a breeze. As a commenter posted, in problem #1, I would've been better served to use Seq.filter as opposed to Seq.choose
Read More...
Beth Massi dropped by my office a couple of months ago and we did a channel 9 video on the PInvoke Interop Assistant . Mainly an overview of the product and a bit of a tutorial. Check out the video here. http://channel9.msdn.com/posts/funkyonex/The-P-Invoke-Interop-Assistant
Read More...
One of the lacking's of the latest F# CTP is debugger visualization support for the built-in list types. Viewing a list in the debugger is decidedly tedious compared to the mscorlib collection classes. Take the following quick code sample
Read More...
Occasionally the debate will come as to when it's OK to use type inference in order to declare a variable. There appear to be three groups in this debate. Whenever it's possible Only when it's absolutely clear what the type is Never, type inference
Read More...
I've been looking for some new problems to work on in F# to get more comfortable with the language. I've been rather slack of late because of other projects but I had a little bit of time this week. I decided it would be fun to join the crowd
Read More...
This is a more amusing than functional debate I enter into from time to time. On a line where you declare a pointer type in C++, where should the * go? Next to the type (i.e. Type* p1;) Next to the variable name (i.e. Type *p1;) Who cares For the moment
Read More...
I had a little bit of time this weekend to download the F# CTP. The IDE portion of the CTP is a huge improvement over the previous CTP. In particular the intellisense engine feels much more smooth, is available in new places and has much better
Read More...
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
Read More...