Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

F# WinRT Benefits

Wiithout wanting to create an open ended question.... F# is currently absent from the Windows 8 dev preview. There is a mapping layer in WinRT that wraps core objects into CLR objects for C# / VB or through other mappings for different languages.

Given that this model does not force languages through the CLR, my question as a functional programming novice is: Is this any benefit to F# (having a direct mapping to WinRT without the CLR layer could further reduce mutability, more native list types) or would it make sense to have a more purely functional language join the ecosystem and leave F# where it is (bearing in mind that interoperability is no longer restricted to CLR languages)

like image 752
Dylan Avatar asked Oct 27 '11 23:10

Dylan


1 Answers

If anybody creates a pure functional mapping for WinRT, that would be quite interesting. However, there is no single right way of doing functional library for something (just like there is no single right way of doing object-oriented library).

The great thing about F# is that you can easily write your own functional wrapper over the underlying (imperative) API. For WinRT, this means that we can easily implement different functional approaches to WinRT programming, without having to write any COM-based mappings.

like image 106
Tomas Petricek Avatar answered Nov 01 '22 08:11

Tomas Petricek