Chapter 11. INTEROPERABILITY

Modern scientific computing often requires many separate components to interact. These components typically use different styles, are written in different languages and sometimes even run on separate platforms or architectures. The F# programming language provides a unique combination of expressive power and easy interoperabil-ity. This chapter is devoted to explaining just how easily F# allows programs to interact with other systems and even other platforms across the internet.

Due to the wide variety of different software used by scientists, a breakdown of the different approaches to interoperation is useful as the exact use of each and every package is beyond the scope of this book. This chapter illustrates how COM and .NET applications can be interoperated with using three of the most important applications: Microsoft Excel, The Mathwork's MATLAB and Wolfram Research's Mathematica.

EXCEL

The .NET platform is based upon the Common Language Runtime (CLR). The primary benefit of this design is the astonishing ease with which different .NET programs can interoperate. The simultaneous and interactive use of Microsoft's Excel spreadsheet application and the F# programming language is no exception. The only non-trivial aspect of interoperating with other .NET applications from .NET languages like F# is the use of dynamically typed interfaces in many cases, including the interfaces to Microsoft Office applications such as Excel.

Microsoft Office is an almost ...

Get F# for Scientists now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.