[Haskell-cafe] Haskell#? F#?

Michael Giagnocavo mgg at giagnocavo.net
Sun Sep 13 20:26:54 EDT 2009


>In one software developers meeting, someone was saying that since
>database work is mostly all state, he didn't see the advantage of a
>functional programming language.

Sigh. I'm still waiting for someone to point out how exactly functional languages do a lesser job here. If this was in relation to F#, it makes even less sense, as F# allows you to use the same libraries you would from other .NET languages. The only real argument I've seen is that functional languages don't have all the same pretty designers that, say, VB, has.

>So maybe the use of multiple cores is now supported by .NET more so
>than the progamming languages on top of it.

F# does make it a bit easier as having immutability by default can be helpful. More importantly, VB doesn't support anonymous methods -- only lambda expressions. That can hinder writing clear async or parallel code. Limited type inference can also be annoying at times, especially with heavily generic code. F# doesn't have these problems.

.NET 4 will have a nicer multithreading library (http://en.wikipedia.org/wiki/Parallel_Extensions), but F# has some async/parallel support already built-in. I imagine this will let a lot more people to write parallel code without too much pain, even in VB/C#. 

However, for a lot of async code, F#'s support for monads ("workflows") makes such code many orders of magnitude easier. I don't see any libraries solving this for less capable languages. 

-Michael

-----Original Message-----
From: haskell-cafe-bounces at haskell.org [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Casey Hawthorne
Sent: Sunday, September 13, 2009 5:32 PM
To: haskell-cafe at haskell.org
Subject: [Haskell-cafe] Haskell#? F#?

The other morning, someone was telling me they had converted most of
their VB financial/stock market code to F#.
Whereas VB only used one core, the F# code used all four cores.

In one software developers meeting, someone was saying that since
database work is mostly all state, he didn't see the advantage of a
functional programming language.

It seems that, if you are doing at least moderately heavy
computations, F# buys you a lot of speed on multiple cores.

------------------------------------------

It now occurs to me that he was using an older version of VB, before
.NET or for earlier versions of .NET.

So maybe the use of multiple cores is now supported by .NET more so
than the progamming languages on top of it.
--
Regards,
Casey
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe at haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list