Forgot your password?

An Interview With F# Creator Don Syme 267

Posted by kdawson
from the same-as-g-flat-if-you're-tempered dept.
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."
This discussion has been archived. No new comments can be posted.

An Interview With F# Creator Don Syme

Comments Filter:
  • by bipbop (1144919) on Sunday February 07, 2010 @04:04AM (#31051006)
    Now that would be unjust.
  • by shutdown -p now (807394) on Sunday February 07, 2010 @05:15AM (#31051168) Journal

    If you don't want the marketing drivel, then the short story is that F# is ML [] for .NET. If you know what that is, you should already know what it's good for, and when you'd want to use it. If you don't know what it is, then you might want to start from the basics [].

  • by j1m+5n0w (749199) on Sunday February 07, 2010 @05:29AM (#31051200) Homepage Journal

    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.

  • Re:Why not Groovy? (Score:3, Informative)

    by shutdown -p now (807394) on Sunday February 07, 2010 @05:32AM (#31051210) Journal

    Groovy is not a particularly apt comparison, since it's more like a cross of Java and Ruby - particularly the fact that it's dynamically typed. On .NET, Boo [] plays a similar role.

    The closest thing corresponding to F#/.NET on Java platform is Scala. It's actually a better language in terms of features, albeit with a slightly different balance - Scala tends to be more concise when dealing with OOP, and more verbose with FP, while F# is the other way around. However, a major difference is that F# has first-class support on .NET (it comes out of the box in Visual Studio 2010, with full IDE support - projects, editing, debugging etc). Scala, on the other hand, is a third-party project on JVM, not backed by any of the major players so far - purely a community project.

  • by shutdown -p now (807394) on Sunday February 07, 2010 @05:40AM (#31051234) Journal

    Being an old fuddy-duddy, my first thought that Microsoft was doing a dot NET version of Fortran, but...

    Obvious retort is why?

    I've no idea why you'd want one, but it exists [], nonetheless - made by Fujitsu of all things.

  • by shutdown -p now (807394) on Sunday February 07, 2010 @05:41AM (#31051238) Journal

    Oh, by the way, Fujitsu must really be into BDSM or something - they also offer COBOL for .NET [].

  • by shutdown -p now (807394) on Sunday February 07, 2010 @06:00AM (#31051304) Journal

    Totally marketing garbage. Man is probably a great guy, with a lousy job. But F#, really? even .NET is ripping off Java.

    I'm not sure I follow. Are you saying that F# is somehow "ripping off" Java? If you mean it's a "rip off" something else, then, well, it's clearly designated as an OCaml derivative, it's not exactly news... but we wouldn't get far if people wouldn't "rip off" the work of others, and build on that. You know, just like Java ripped off C++ and Smalltalk, and JavaScript ripped off Self, and Smalltalk ripped off Lisp, etc...

    If you mean .NET as a whole being a rip-off of Java, then you're late by like 6 years or so - C# 1.0 was for the most part "a better Java" (note the "better" part, however), but since then it has evolved much faster, and Java is struggling to keep pace, "ripping off" C# as it goes. To give a specific example: C# had first-class functions (called anonymous delegates in the language) in version 2.0, released in 2005. Java still doesn't have them, and they will only likely come in Java 7, to be released by the end of this year. To give another example, C# 2.0 and above has generics that Java language designers would call "reified". Java doesn't, and there's no telling when, or even if, it will.

    Microsoft talks about building "ecosystems" but the way they do it, everything in the ecosystem has to have a M$ logo on it. Why can't they just inter-operate and integrate with outside software?

    Uhh, I don't even know where to begin here.

    Here [] is the C# language specification, if you ever want to write your own C#compiler. Here [] is the CLI spec - this covers VM semantics, all involved file formats, and the fundamental class library - this is useful for a .NET compiler for any language.

    And third-party languages for .NET do exist in large quantities. One good example is Delphi Prism [], which provides full Visual Studio experience, not any worse than what is there for C# out of the box. Then there's Eiffel, Smalltalk, Perl, Fortran, COBOL... IronPython and IronRuby were also outside projects, by the way - their authors got hired by MS along the way because the company was interested in developing dynamic languages on the platform, and, naturally, picked the two most popular ones.

    Libraries are also part of the "ecosystem", by definition and there are tons of third-party ones. I won't even bother giving links as there are too many - google it if you want.

    So, can you explain what you mean by "inter-operate and integrate with outside software" with respect to .NET, if the above is not good enough?

  • by Anonymous Coward on Sunday February 07, 2010 @06:02AM (#31051318)

    In music theory, F# is as far as you can get from C.

    if you want to stay in the same octave, otherwise it is 16khz

  • by EsbenMoseHansen (731150) on Sunday February 07, 2010 @06:26AM (#31051388) Homepage

    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?

  • Re:.NET Framework (Score:4, Informative)

    by Paradigma11 (645246) <> on Sunday February 07, 2010 @07:01AM (#31051514)
    Dr Eric Meijer from microsoft research has given a pretty nice 13 part lecture on functional programming in haskell based on graham huttons book:
    there are also a ton of other videos about f# on channel9 like:
    or others specifically on asynchronicity and parallelism in f#....
  • Marketing? What the? (Score:3, Informative)

    by Puff_Of_Hot_Air (995689) on Sunday February 07, 2010 @07:19AM (#31051576)
    I understand that it is popular to bash anything that burst forth from the loins of Microsoft, but c'mon! This is Don, The Don, this is one hard-core damned brilliant programming dude (for want of a better term). He was single handedly responsible for generics in c# (something I am greatly thankful for in my day to day work) F# is his baby; the guy is passionate about the idea of a real world practical functional language. Sometimes people use emotive language when they are talking about things that they have devoted themselves to for years. Especially when they believe that it could bring functional programming into the mainstream. I have used F#, and personally really enjoy coding with it (and especially the different way in which solving problems in this manner makes you think). Might be a long time before it is excepted into production code though...
  • by EsbenMoseHansen (731150) on Sunday February 07, 2010 @07:51AM (#31051684) Homepage

    F# version is essentially the same as OCaml version.

    I don't know OCaml (I have a cursory knowledge of Haskell, which is why I picked that for comparison), but I could read the OCaml version no problem. The Scala version was difficult, but after staring at it for a bit I understands what it's getting at (especially the _ syntax is unnecessary obtuse). I still think F# is the worst of the lot. Big disclaimer: I have only looked at the factorial example. So this is sort of criticism based on "Hello World" snippets. I'm just saying that the poster far above might actually know what he is talking about,.

  • Re:Why not Groovy? (Score:3, Informative)

    by Yuioup (452151) on Sunday February 07, 2010 @07:57AM (#31051698)

    I would say of all the functional languages I looked into Scala was the nicest, followed closely by F#.

    That is purely because it was easier to get up and running with Scala on Linux & Eclipse.

    I like to learn new languages using an IDE. When I've learned it well I start hacking away in a text editor.

    My primary IDE for IronPython on my Windows machine at work is vim ;-)


  • by Anonymous Coward on Sunday February 07, 2010 @09:19AM (#31051952)

    I've never used F# but that syntax is very clear as long as you understand pattern matching. Furthermore, the F# version won't cause a stack overflow for large values of n where the Python version will.

  • by DannyO152 (544940) on Sunday February 07, 2010 @11:38AM (#31052606)

    F# as the same kind of thing, but with first-class IDE and debugging support

    Aha! Right there is the problem. The first-class IDE is Windows-only.

    I do use Haskell. TextEdit and emacs work well enough. May I suggest that a good REPL, strong type system, and pure functional style mean that debugging is a different process than watching memory locations change value for imperative languages. I've checked out OCaml, but its notation - call me shallow - meant I went back to lisp and shortly after embraced Haskell. I'm also told the book I used as guide, "Practical OCaml Programming," is notoriously poorly written.

    Since F# borrows heavily from OCaml for notation, its superior use case is for developing on Windows for Windows using a functional style and that really implies that the clients are going to be running a desktop application. While no language that actually does something can be totally pure, I thought some of F#'s FP goodness was undercut via the interaction with DLLs and .net objects. On the other hand, it does resolve the foreign interface problem that non-C languages have, but pretty much only for Windows.

    As a practical consideration, over the years, there have been many periods of significant length when mono and fsharp would not compile on OS X via Macports. No complaints: everyone's a volunteer and I'm hitching a free ride. But, at some point one stops paying attention. Looking at the state of the art today, scala and clojure offer nice integration with existing code (read gui widgets) and as they rely on a jvm are cross-platform. The one little ugly part to those implementations is that the jvm cannot do automatic tail recursion, so the programmer has to be aware of stack issues and use workaround functions for recursion.

If bankers can count, how come they have eight windows and only four tellers?