Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Metro style Apps with F#?

In the Build 2011 keynote and demos, they were always talking about C++, C#, Visual Basic and JavaScript. Can't I build Metro style Apps with F#? Or is it safe to say that if it works with C#, then it works with F# as well?

like image 685
jeha Avatar asked Sep 17 '11 11:09

jeha


3 Answers

Or is it eligible to say if it works with C# then it works with F# as well?

Yes, that's how it is supposed to work. In addition to javascript and C/C++, any CLS compliant language that runs on top of the CLR will have access to the WinRT API.

Unfortunately in the VS 2011 Express edition you don't get tooling support but I guess this will be added progressively or to other editions:

enter image description here

like image 141
Darin Dimitrov Avatar answered Nov 08 '22 04:11

Darin Dimitrov


Don talks about this a little around 7:40 into his talk.

http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-904T

like image 11
Brian Avatar answered Nov 08 '22 04:11

Brian


I had the same question and created a blog post: Create a Metro App in F# (NOT)

There are a few issues:

  • You cannot reference ordinary .NET dll’s (even in C#). They have to be have recompiled with a “reference” to the WinRT. Because of this you cannot reference the F# dll. I think this will be solved when F# 3.0 get released (source: Understanding F# slide from Don Syme at build).
  • The ability from F# to create Metro apps. This has to be built by the F# team. This is an open question. This is the all-F# approach (In WPF it is today possible but not recommended).
  • Tool support for creation Metro front-end projects. This will be not the case for the F# 3.0 release. (source: Understanding F# slide from Don Syme at build).
like image 8
Piet Amersfoort Avatar answered Nov 08 '22 05:11

Piet Amersfoort