Lambda the Ultimate

inactiveTopic F#
started 5/16/2002; 3:08:16 PM - last post 6/3/2002; 2:39:59 AM
Dejan Jelovic - F#  blueArrow
5/16/2002; 3:08:16 PM (reads: 3265, responses: 5)
From the site:

"F# is a mixed functional/imperative programming language based on the design of the functional language Caml and the .NET language C#."
Posted to functional by Dejan Jelovic on 5/16/02; 3:12:15 PM

Albert Y. C. Lai - Re: F#  blueArrow
5/16/2002; 5:24:22 PM (reads: 1563, responses: 0)
If you know Caml, you almost know F# already. There are minor differences, but an F# program is supposed to look like a Caml program.

andrew cooke - Re: F#  blueArrow
5/16/2002; 7:45:18 PM (reads: 1568, responses: 0)
Why is MS developing both and F#? What are the politics here? Why isn't released?

Also, in the list that compares features, what are "substructures/namespaces/packages"? I've used SML a bit, but this doesn't ring a bell (structures, signatures and functors are mentioned separately).

Don Syme - Re: F#  blueArrow
5/25/2002; 4:36:04 AM (reads: 1420, responses: 1)
Hi Andrew,

It is common for languages to have namespaces or packages but where the packages can't themselves be used as values in any way. Standard ML and OCaml allow packages (structures) to be used as values as functor arguments.

F# has structures - like Caml each file denotes a structure, but they cannot be used as values, and cannot currently be nested, structures can't currently contain structures. There is no particular reason why substructures aren't implemented except that in my personal optinion they are not as useful as people think except when writing very large frameworks like the .NET framework or the Java class libraries. F# is currently aimed at writing 100-50,000 line programs that either define .NET assemblies or access other assemblies. For this kind of programming, which ML is very suited to, you can get away without writing substructures.

You can access nested .NET namespaces using long identifiers (System.XML.XmlNodeList), and no doubt substructures and/or subnamespaces of some kind will be added to the language proper at some point. However I don't plan on sending F# down the functor rat-hole.

To answer your other question, SML.NET will be released soon. The great thing about .NET is it just doesn't matter if you have more than one language implementation: you can quite easily share modules across langauges. The main purpose of F# was to work out parts of the cross-language functional programming story in a slightly simpler setting than full SML. In particular, F# concentrates on making all ML constructs be accessible from other .NET languages, and on a simpler tool/compilation story. These things are hard to retrofit on a project like SML.NET which has a large whole-program compiler and a more complicated (but in some ways more expressive) surface language. Now we've worked that out it's equally likely that we'll transfer the results back across to SML.NET and you'll be able to access all SML constructs from .NET languages as well. Eqully we might use SML.NET's whole-program compiler backend for F# and some point, depending on need and resources available.

So, F# or SML.NET- it doesn't really matter: choose one and get going with .NET programming - it really is good fun to suddenly have access to all these libraries and web services!

Best wishes, Don

andrew cooke - Re: F#  blueArrow
5/26/2002; 1:12:01 PM (reads: 1467, responses: 0)
Thanks for the info.

I also heard from the SML.NET people by email - I gather it will be relased "this week".

Ehud Lamm - Re: F#  blueArrow
6/3/2002; 2:39:59 AM (reads: 1379, responses: 0)
Haskell.NET discussion inspired by F#.