Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What areas of code are you using f# for? [closed]

For those of you out there who are using f#, what areas of functionality are you coding with it? What is the language really well suited to and what does it do with far more power and ease than say c#?

like image 692
Peanut Avatar asked Feb 20 '09 09:02

Peanut


3 Answers

Deep Fried Bytes #24 podcast covered this:

  • Algorithmic processing (including calculations)
  • DSL creation
  • Concurrent processing (immutable data, message queuing, asynchronous workflows)

And of course, for many systems F# may form a processing core, but it seems to me that it will more often than not be wrapped (interface, user or otherwise) with C#/VB to provide a conventional interface.

like image 50
Richard Avatar answered Nov 15 '22 08:11

Richard


Parsing with FParsec (a port-in-spirit of Haskell's Parsec)

like image 5
Mauricio Scheffer Avatar answered Nov 15 '22 09:11

Mauricio Scheffer


I'm currently using F# to develop my next indie video game. So far I'm finding that my normal OO approach is different from how I develop in c#.

Some good things I've noticed is that I'm using smaller functions on average ie the number of lines per function is way down. It's also more natural now for me to scope a static private member function to be inside of another member instead of having it be exposed to everything in the object. Writing a collision algorithm was really easy. It's a bit early for me to say that writing algorithms in F# is easier but I'm already leaning that way.

Not everything has been roses since I started using F#. I'm still finding online documentation lacking. Expert F# has been of some help but since it skims over OO it leaves me lost a lot of times. It gets on my nerves that the author chose not to go very deep into OO when it's currently the most popular form of development. I'm not looking to dump OO. I'm looking to integrate functional into it.

The biggest advantage I've seen so far has been my codes correctness. I know it sounds funny but every time I've gotten my code to compile, it has worked as expected. I hope this is still the case when I break the ten thousand lines of code mark.

like image 5
gradbot Avatar answered Nov 15 '22 10:11

gradbot