Mike Hall caught up with Don Syme recently and recorded a few interviews covering Don’s favorite programming language: F#. Don has done many great things over there in MSR Cambridge including creating everybody’s favorite C# feature, Generics. Well, he also developed (with his team) the research programming language, F#. “F# is a programming language that provides the much sought-after combination of type safety, performance and scripting, with all the advantages of running on a high-quality, well-supported modern runtime system.”
It would indeed be very nice to see a modern, strongly typed functional language entering mainstream. For me, the main problem with those languages has always been lack of libraries, which is now solved by .NET.
As for the video, it is about what type of applications F# is good for and how it fits Microsoft plans, rather than about the language itself. There are no specifics, no code shown. You can find info on F# at
http://research.microsoft.com/fsharp/fsharp.aspx
I can only concur with the above comments, interesting to see a new programming language of this specific type . I’m a big fan of chr (1), dunno if F# is similar, the video makes me believe it is. I’ll read the site you linked in search of answer!
1) http://www.cs.kuleuven.ac.be/~dtai/projects/CHR/
Edited 2006-09-13 22:55
F# is almost identical to Objective Caml, see http://caml.inria.fr/
Yeah, this intro video wasn’t very informative, but apparently this is the first of a series (the summary says Mike Hall “recorded a few interviews” with Don Syme on F#).
There’s a post a Channel 9 saying, “Part 2 will air tomorrow and will contain lots of F# demo code (for those who have expressed dismay that there are no samples in part one, which is, as titled, an introduction….)” so that should have more meat to it. ๐
Edited 2006-09-14 02:35
I just read through some of the F# Manual. I wish people that wrote languages would stick with what already works as far as syntax goes instead of mucking it all up.
For example…
When ‘x = “Hello World”‘ is perfectly understandable syntax, why muddy it up with ‘let x = “Hello World”? The “let” is completely unnecessary.
x = “Hello World” is an expression, let x = “Hello world” is a binding.
“let” isn’t unique to F#. It comes from F#’s ancestors.
Edited 2006-09-14 01:37
As a previous poster pointed out, ‘let’ isn’t the same as the state-changing ‘=’. While it is possible to omit the ‘let’ and achieve the same thing, you’d probably end up with a lot more misunderstanding, e.g. “why can’t I reassign this variable that I already set?”
Well enough with the video, I’m going to waste my time on learning F# tonight
i’ve always found it interesting that f# and ghc (haskell compiler) are both being developed at microsoft cambridge.
Apparently ghc is _not_ developed by microsoft cambridge, as you can imagine if you see the name:
glasgow haskell compiler (ghc).
http://www.haskell.org/ghc/license.html
Edited 2006-09-14 09:19
A guy at my university done a study on haskell being implemented using .net. I can’t recall the exact number but there was large performance drops compared to ghc.
I believe this would be similar with f#.
I am also guessing that MSIL was created with a larger focus on statically typed imperative languages. Although they are making extensions for dynamically typed languages.
It was started at u of glasgow, but when SPJ was hired by microsoft research development moved to their cambridge lab. to quote wikipedia: “The Glasgow Haskell Compiler (or GHC) is an open source native code compiler for the functional programming language Haskell which was originally developed at the University of Glasgow, primarily by Simon Peyton Jones and Simon Marlow. Development continues under the auspices of Microsoft Research in Cambridge, England, which employs Peyton Jones and Marlow.”
it’s still bsd-style licensed and i doubt microsoft would ever move so much as to call it a project of theirs, but i’m sure F# could benefit quite a bit by looking at the implementation of ghc as it is quite fast.
GHC is developed in large part by Simon Peyton Jones and Simon Marlow, both of which are employed at Microsoft Research in Cambridge.
Don’t forget SML.NET, though its development is pretty glacial.
check F# if you want to have a good laugh!
what a nonsense, just a slightly modified syntax compared to C#. maybe some could write a perl script that parses C# <-> F#!
Microsofts .net framework just doesnt do very well with dynamic typing, so then make a stong typed scripting language?
please ppl: see IronPython for the .net platform.
or better JRuby for the javaVM platform.
or better just plain ruby.
Poor troll! They are supposed to start off sounding intelligent, this is more like Emily Litella in the good old days.
Could you actually convert F# to C# at source level? The first step would be to change everything not const to mutable, which would be sort of like converting every variable in a C program to a void* and allocating space for it. The resulting abomination would be like one of those medieval creations with different animals sewn together.
Functional programming is not the answer to everything, but it’s a great answer to a lot of things. It’s worth a little effort to understand.
and it turns out to be O’Caml with improvements, sort of like C# vs Java. It has slightly less mind-slammingly ugly syntax than O’Caml, but I expect the performance hit to be rough: C# is generally slower than (pokey) Java, while O’Caml is one of the fastest modern languages.
The idea of a functional language that can be seamlessly attached to a modern GUI framework is compelling indeed. I’d never really bothered with F# because of issues with the framework (I loathe C#; Managed C++ is a kludged together mess; the .NET framework is very rare in consumer machines, Windows-specific unless you can handle Mono’s immaturity and IP issues, and frankly not all that good anyway.) I’d been meaning to look into the latest .NET, maybe I will now.
Boilerplate to try to avoid reminders that .NET is “standardized” and therefore Mono is safe: the standardization specifically allows for charging a royalty on the runtime. That will make things very tricky for any OSS projects that use a runtime developed from the spec. The framework library itself is entirely proprietary, and the arguments for it being reverse engineered don’t look all that great if MS seriously challenges it.
I really like the idea of having multiple languajes running on top of a VM sharing a common framework/library.
Now, I have a question …
Is the .Net VM a better VM than the JVM ?
MSIL is the MSFT version of Java Bytecode. If so, why all these languajes keep appearing for .Net only?
Just to note that part2 of the video is avaible,
http://channel9.msdn.com/Showpost.aspx?postid=234889
๐
Way cooler than the first video!
Looks really easy to do nice things in this language but, of course, we have to keep in mind that there was some support code written for the demo (he said about 400 LoC)
so it’s not quite as easy as it looks.
Filming the screen instead of capturing the output is a very poor and annoying idea imo.
I enjoyed the video nevertheless.