Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is F# a usable language for .net windows development

I have been hearing about F# and Microsoft now have a guy who is blogging and coding away in redmond somewhere about it. Can you really write GUI code from F# (I'd love to see an example of say adding a button to a form and subscribing to the onclick event for instance)

Does F# have full access to all of .Net?

I'm honestly curious and I know I could google but I'd love to hear from someone who is really using the language.

like image 343
Spence Avatar asked Feb 17 '09 12:02

Spence


2 Answers

Yes, you can certainly write WinForms apps - although you wouldn't override the OnClick method, you'd subscribe to the Click event.

Yes, F# has full access to .NET, although you won't get very idiomatic functional code if you use a lot of mutable types.

Tomáš Petříček's F# web site has sample source code from his book (disclaimer: I'm involved with the book too, so I'm clearly biased) which has WinForms examples.

like image 84
Jon Skeet Avatar answered Oct 04 '22 21:10

Jon Skeet


I'd highly recommend this excellent post by Scott Hanselman, which points to some F# resources including examples and presentations.

like image 22
Leonardo Avatar answered Oct 04 '22 21:10

Leonardo