Study Group – F#

Chris Marinos led study group this week on F#. F# is Microsoft’s foray into functional programming; it isn’t strictly functional, but it is clearly designed with that purpose in mind. I thought I had gotten some of experience with functional concepts using LINQ in C# and in some of my Ruby experience, but Chris showed us some really cool ways of doing things.

Chris started by presenting some of the language elements; one of the main points he talked on was side effects. Methods in imperative languages like C# can mutate the input arguments, so that if you pass the same reference into the method multiple times, you won’t get the same result each time. The input data will have changed. In F#, and other functional languages, methods are written without side effects, which makes them concentrate much more on what you are trying to accomplish.

Next, we solved a couple Euler problems in an imperative and functional way to see the differences in style and execution. It was a really interesting exercise.

I’ve been interested in the idea of functional languages for sometime, so going over what we did was really interesting. I think it would be very cool to build an entire application in F#.

This entry was posted in .Net, F#, Study Group. Bookmark the permalink.