Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is F# better than C# in scenarios where you need complete parallelism in parts of an application?

Is F# better than C# in scenarios where you need complete parallelism in parts of an application?

My main language is C# and I am writing an app where the core functionality built on top of the app (C#) has to be and planned to be very parallel.

Am I better of implementing these classes in F#?

like image 324
Joan Venge Avatar asked Feb 26 '09 23:02

Joan Venge


People also ask

What IS F used for?

People on the Internet use the letter F usually in a genuine way to express respects, sadness or condolences towards other Internet personalities, Internet memes or other players on certain events, such as death, misfortune or the end of a phenomenon, company, game, series, etc.

What was the last year Lexus made the IS F?

2008–14 IS-F.


2 Answers

I'd look at the Parallel Extensions that's being developed by Microsoft.

like image 136
JoshBerke Avatar answered Nov 10 '22 01:11

JoshBerke


If you just need to process sets of data in parallel, the ParallelFX are very handy. They'll take a lot of pain out of doing it manually in C#.

But if the code has a lot of asynchronous code, F#'s async monad makes it vastly easier than can be done in C#. If you're looking at a lot of BeginXXX/EndXXX or the dreaded XXXAsync/XXXCompletedEvent code, then F# will be a major win.

Otherwise, you'll just have the general gains of F# over C#.

like image 42
MichaelGG Avatar answered Nov 10 '22 01:11

MichaelGG