Fun with F# - Life, the solar system and everything (in 101 samples)
- Posted: Mar 25, 2011 at 7:00 AM
- 10,379 Views
It's been said that to keep your dev skills fresh it's good to learn a new programming language every week|month|year. That this broadens your point of view and helps keep your brain active and smelling sweet.
And if you're looking for a language to learn, Visual Studio 2010 shipped with a complete new language in the box, F#. And this isn't your C/C++/Java/C# type language, nor VB, nor dynamic/scripting kind of language. F# is a functional programming language. I'll
The 101 Samples project makes it easy to check out some some of the different things you can do in F#.
And of course the app itself is written in F#;
Another kind of fun thing to play with is a simple solar system simulation;
This sample simulates the orbits of planets around the sun. The calculations use real data and the units of measure feature in F# allows the compiler to help verify that they are correct.
And what's programming without a Game of Life?
This program is an implementation of Conway's Game of Life with a basic UI to allow the user to interact with the simulation. The simulation state calculations are performed on a separate thread from the UI to help keep the UI responsive.
Short and simple projects to get you and I started playing with F#. Perfect weekend coding fun...