The .NET development community is not without its set of scripting language enhancements. Among the most prominent is F#, which began as a Microsoft research programming language "to provide the much sought-after combination of type safety, succinctness, performance, expressivity and scripting, with all the advantages of running on a high-quality, well-supported modern runtime system." Microsoft is now turning F# into a fully-supported language on the .NET platform.
C# MVP Tomas Petricek, author of Real-world Functional Programming in .NET is working on a book about F#. Petrick says F# encourages the functional immutable style of programming, which is suitable for writing concurrent and distributed programs that can be easily tested. Moreover, it supports the declarative style of programming. "The way I like to talk about declarative style is that it allows you to divide the work between senior programmers that develop some 'smart' library for solving problems and junior programmers that use it to solve daily problems," he says. "An example of this may be List module in F#, but the LINQ libraries in .NET 3.5 follow the same functional principles."
Many programming languages make it easy to write something small that grows into a larger app, but they present problems when the software needs to turn into a real library with a strong logical structure. "F# gives you an excellent way for doing this," says Petricek. "You can start with simplicity (just as in dynamically-typed languages such as Python or Ruby), but end up with a very robust program (just as in C# or Java). The key benefit of F# is that the transition is completely fluent without having to do any painful steps in between. In fact, you don't need to rewrite any code that you wrote at the beginning."
Bulgarian ASP.NET developer Mihail Kochanov sees additional benefits for F#. "I believe learning F# makes me a better C# programmer," he says, explaining that F# made it easier to understand LINQ. He's also interested in F# for its parallel library context. "If you have stuff you might want to run parallel in the future, it might be good to be ready," he says.
Join the CIO Australia group on LinkedIn. The group is open to CIOs, IT Directors, COOs, CTOs and senior IT managers.