Monday, October 16, 2006

update on F#

I haven't used F# much recently, but I've tried to keep myself apprised of it. Don Syme's blog seems like the de-facto news site; many of the following links go there. Let the bullet shooting commence.
  • F# has a new "light" syntax option (put #light at the top of the file). With #light, various end-of-line constructs like semicolons or the "in" at the end of a "let" are no longer necessary. Also, groups of statements are delimited by indentation (Python-style). I like the convenience of this option, of course, but my snobbish side feels offended by how it makes ML-style functional code feel even more like the plain imperative kind. So, points for style, maintainability, conciseness, shallower learning curve, etc., but negative points for reducing the tangy esoteric/baroque flavor.
  • Syme has made a draft chapter of his upcoming F# book available for anyone to read. I recommend it as a supplement or even a replacement to the tutorial information floating around the Web. It's a kinder, gentler approach to learning F#. After reading it, I realized that I could simplify parts of my code by using object methods where possible rather than always calling functions from modules (functions in which the first parameter was the object!).
  • There are a couple F#-related video clips that were on Channel 9. One is an interview, and the other is a flashy demo. If you already know all about F#, neither of these clips will provide new information. I repeatedly paused the demo clip so I could examine the code on screen. In the interview, Syme is quite diplomatic about the possible real-world uses of F#. While F# may shine at data crunching, it also is a general-purpose language that shares many features with C#.
  • I went to TIOBE after reading that Python had overtaken C#, and I found that, although F# isn't in the top 20 or even 50, it has a specific mention in the "October Newsflash - brought to you by Paul Jansen" section. To quote:
    Another remarkable language is F#. The first official beta of this Microsoft programming language has been released 3 months ago. This variant of C# with many functional aspects is already at position 56 of the TIOBE index. James Huddlestone (Apress) and Robert Pickering draw my attention to F# via e-mail. Later Ralf Herbrich from the X-box team of Microsoft wrote to me "After working with F# for the last 9 months, I firmly believe that F# has the potential to be the scientific computing language of the future." [...] In summary, I think both Lua and F# have a great future.
Regardless of a programming language's merits, qualitative factors like its buzz level, ease of learning, and PR savvy affect its popularity. As others have noted, Python and Ruby had a long history before achieving notoriety. In spite of still being just a continually-evolving "research project", F# is well on its way.

2 comments:

  1. Hello Art,

    Sounds interesting. So it's a variant of C#, which means it is an all-purpose programming language, in the same family as C#.

    For some types of data crunching , it can help to use a specialized language, specific for some type of data management or data manipulation. I think specialized languages(with the exception of SQL) tend to get short shrift from many programmers. That is really too bad, because sometimes a specialized programming language is the right tool for the problem at hand.

    Here are various data management programming languages I would like to mention:

    SQL, by far the most famous one. But for messy data , SQL is not so good at transforming and cleaning it up , prior to reporting and analysis. SQL is built for setting up, managing, correcting , querying the FIRST database(where the data is first entered into electronic world the first time). But SQL is not so good at data crunching, which is the missing gap between relational databases and statistical analysis.

    MDX, I believe came from Microsoft in the late 1990s. You may know more about this one than me Art. Similar to SQL , largely for querying a multi-dimensional cube, where the data has already been
    cleaned up and loaded. I've never heard of it as being used for the "T" part of ETL. So it's specific for certain types of data analysis where the data and analysis fit well into that mathematical model(the hyper-cube). When the problem fits that model, very powerful, otherwise, problematic. My first impression is it has the toughest learning curve of all the tools I mention here, the syntax takes some getting used to.


    S ( and also, R). From AT&T, decades ago. Very good at statistical analysis and graphics. Not so good at cleaning up the data and preparing it for analysis(again, data crunching).

    SPSS Proprietary language for data crunching and statistical analysis. Around for 20-30 years.

    SAS Proprietary language for data crunching and statistical analysis. As old as SPSS. SAS is much more financially successful than SPSS, but SPSS is still big.
    Astonishingly expensive. SAS is considered a more powerful data crunching language than SPSS, however, unless you have invested many months practicing both, the influence of marketing and groupthink is hard to separate out. A comparison of the two is actually fairly subtle.

    VILNO This one is brand new. It competes in data crunching with SAS and SPSS. I do not feel that it competes with MDX( and certainly not SQL). Easy to learn. As the product continues to fill out, it will be able to do more and more data crunching tasks in less time, with less code, than the older tools.
    Currently available at
    www.my.opera.com/datahelper


    As you can see , many of the specialized programming languages are quite old, this is because it has not been a hot topic in recent years - and that is an oversight.

    Robert Wilkins

    ReplyDelete
  2. Thank you for the informative comment. Just to clarify, the syntax of F# is closer to OCaml than C#, especially before the #light syntax. However, F# runs on the CLR, so its object system is more like C# or Visual Basic.Net than OCaml's. Actually, from what I can tell, F# programmers often use the "record" (somewhat like a struct) data type and closures more than "real" objects, which do serve as a useful bridge from F# code to other CLR languages.

    When Don Syme and others describe F# as a good language for numerical/scientific computing, they just mean that F# is particularly suited for that domain. Much as Perl achieved a reputation for excellent text manipulation, because of its built-in regular expressions, and numerous functions for slicing and dicing strings, and very-high-level data types.

    No, I don't know MDX. I'm relatively new to most Microsoft technology (management mandated a switch to ASP.Net). I heard about hyper-cube tools when we were considering Cognos. We may switch to it eventually.

    ReplyDelete

Note: Only a member of this blog may post a comment.