An Interview With F# Creator Don Syme
OCatenac passes along an interview with Don Syme, chief designer of F#, which is Microsoft Research's offering for functional programming on the .Net platform. Like Scala, which we discussed last fall, F# aims at being an optimal blend of functional and object-oriented languages. "[Q] What is the best program you've seen written in F#? [A] I've mentioned the samples from F# for Scientists, which are very compelling... For commercial impact then the uses of F# in the finance industry have been very convincing, but probably nothing beats the uses of F# to implement statistical machine learning algorithms as part of the Bing advertisement delivery machinery. ... We've recently really focused on ensuring that programming in F# is simple and intuitive. For example, I greatly enjoyed working with a high-school student who learned F#. After a few days she was accurately modifying a solar system simulator, despite the fact she'd never programmed before. You really learn a lot by watching a student at that stage."
Will D flat be the same language as c#?
Sure, when everything works out. Something tells me F will mean something completely different when youre getting compiler errors or crashes.
and the emotive language and buzzwords
*yawn* unconvinced.
Last year I wanted to know what all the hoopla was about functional programming. I checked out Haskell, Scala, OCaML and F#. Coming from a Java/Delphi/C# background myself I had to go through it a couple of times before I "got" it. I'm glad I did because I banged out my first production IronPython lambda function on last Friday (yay!).
I know that MS bashing is popular here on Slashdot, but I really want to take a moment to say that the .NET Framework really is excellent. The ability to mix and match different paradigms and languages in a clean an concise manner which is a joy to program in.
Yeah I know patents bla bla mono bla bla Novell bla bla Miguel bla bla.
To say a language is "functional" does not mean the same thing as the common usage of the word, which is to say "useful" or "utilitarian", though in my experience with Ocaml, Haskell, and Erlang, they are that as well if you take the time to learn to use them well. Fortran and F# have just about nothing in common.
The name "functional" is a little confusing, since imperative languages are heavily based on functions as well, though they are not typically used in the same way. For instance, in a functional language it is usually much easier to write functions that compute useful things without causing side effects, such as modification of shared state. They also usually support such features as tail call optimization (which causes certain forms of recursion to require constant rather than linear stack space), closures, the ability to declare functions within other functions, and the ability to call a function with less than its expected number of arguments, yielding a function of the remaining arguments.
Another common trait of functional languages is the absence of looping constructs, in favor of recursion and library functions like map and fold.
Oh, by the way, Fujitsu must really be into BDSM or something - they also offer COBOL for .NET.
He was probably modded as troll because, while he may be entirely correct about "marketing droids", the conclusion that "F# stinks" doesn't exactly follow from that - unless he has some specific horror stories to share. Or at least saw the language, and is qualified to judge on its merits (i.e. familiar with similar existing languages).
Looking at the wikipedia articles, I tend to think he has a point. Look at the F# version of the famous factorial program and compare to the Haskell version(s). I think anyone would be hard-pressed to prefer the F# version, but who knows?
Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
I agree that Python has some strange things about it, but look at some sample f# syntax from Wikipedia:
let rec factorial n =
match n with
| 0I -> 1I
| _ -> n * factorial (n - 1I)
What do those funny characters mean? What's the I after the numbers? Compare to the python one liner:
def factorial(n): return 1 if n == 0 else n * factorial (n-1)
That makes sense even to someone with absolutely zero experience in the language.