|
In my book, From Imperative to Functional Programming, which will be available soon through SyncFusion for free, I do demonstrate that, separating the stateful UI aspect in C# from the database calls, written in F#.
My article How to Think Like a Functional Programmer[^] was the impetus for the book.
Essentially, use C# for stateful things, and use F# for immutable (stateless) computations. It's a pleasure to work in it, though there are some gotcha's with the type inference that can be hair pulling experiences, no different than any other FP language.
I often use VS's Interactive F# to test algorithms because I can poke and prod at the "computation" to make sure I'm doing it right.
Marc
|
|
|
|
|
Mighty good Mark! I am going to pore over your article pretty soon!
|
|
|
|
|
I've skimmed very quickly for now and bookmarked. But looks good.
Kevin
|
|
|
|
|
F#
is that a kid sister safe synonym for
Elephant?
Life is too shor
|
|
|
|
|
|
Not exactly. I do not at all appreciate academic papers that speak derogatorily about COBOL.
Life is too shor
|
|
|
|
|
Here is a console application that uses F# API.
C# Code:
static void Main(string[] args)
{
Console.Write( Sample.MyType.SomeMethod());
Console.Read();
}
F# API:
namespace Sample
type public MyType()= static member SomeMethod ()= "I came from F#"
It might be a little complex but I am sure you can work your way through it.
|
|
|
|
|
Haha, good start!
I should have tried that before! :P
|
|
|
|
|
....or has anybody noticed that the standard of CP started to go down since about 7 years and a day ago?
|
|
|
|
|
Yeah, but yesterday everything seemed ok again for a brief while...
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Or 7 years and two days ago?
|
|
|
|
|
No seven years and 2 days ago was the "The last of the Good days".
|
|
|
|
|
I see what you did there
|
|
|
|
|
|
Now that you mentioned it, this correlates with a huge increase of the World's gin consumption.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what it used to.
|
|
|
|
|
Do you really think his fake machismo references to Gin, and now ecstasy, need reinforcing?
"The whole idea that carbon dioxide is the main cause of the recent global warming is based on a guess that was proved false by empirical evidence during the 1990s." climate-models-go-cold
|
|
|
|
|
Have any of you left a development job for a SQL position and kept feeling "pulled" to development?
|
|
|
|
|
Now what is a SQL position ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what it used to.
|
|
|
|
|
Simple: http://msdn.microsoft.com/en-us/library/ms186323.aspx[^]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
"One can be in a position to do all".*
*I forget where I read that - could have been the Kamma-Sutra
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos wrote: "One can be in a position to do all".*
*I forget where I read that - could have been the Kamma-Sutra
For many here, one and infinity are the same.
|
|
|
|
|
Any time I am in any sort of job where I have to only do one thing all day, I keep getting pulled towards all of the other things.
Pure SQL development sounds awful!
|
|
|
|
|
I do SQL development. I have left a job where I didn't do much SQL (and some VB.net) for a job where I do more SQL (and some C#).
I would not want to do only SQL. I always find utilities and such I can write to make my job easier.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Anyone here remember the lawn wolf? I salute your memory if you do.
Anyway there's this cat (stray or maybe a distant neighbor's) that thinks our garden is its own personal loo. The Mrs is besided herself when it uses the flower beds, and once it peed on some of the kids' toys that we forgot to bring inside. Stank even after washing several times. This morning there was a big one right on the lawn. Stupid moronic animal, aren't cats supposed to at least bury it?
Any ideas on how to repel it (without causing grievous bodily harm)? The locally available cat repellent (a) doesn't work and (b) stinks, making the cure worse than the disease. Googling reveals some rather dubious suggestions, and I don't want to spend hours guarding the lawn just to soak it with a hose.
|
|
|
|
|
S u n s h i n e wrote: Anyone here remember the lawn wolf
Is this a CP reference or something else I am too young to remember ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what it used to.
|
|
|
|