On Monday 05 November 2007 02:34, Steve Lianoglou wrote:
> Hi Jon,
>
> While it's going to take me a while to make heads or tails of your
> entire post, I just wanted to thank you for taking the time to write
> such a detailed response.
>
> Thanks!

Not at all. I described the major points but there are still many other 
aspects of Scala that I am undecided on. Scala, OCaml and F# all take 
different approaches to the rich syntax of user-defined operators, 
particularly infix operators. The Scala approach of using member functions 
called "+" is quite alien to me and it involves some trade-offs. After almost 
a year of working full-time on F#, I am still undecided on whether or not 
mixing C#-style operator overloading and ML-style type inference in F# is a 
good thing. In the end, there may be more aspects of Scala that I consider to 
be sub-optimal design decisions.

There are also practical problems when migrating from a stand-alone FPL like 
OCaml to one hosted by an existing platform like .NET or the JVM. Stand-alone 
FPLs like OCaml and MLton are fantastically efficient but .NET and the JVM 
are optimized for heavily-imperative code. Consequently, allocation often 
makes functional F# programs run 5x slower than equivalent OCaml, exceptions 
are 600x slower in F# than in OCaml (and they are a core part of the CAML 
family of languages, used extensively in ordinary non-exceptional code: 
OCaml's exceptions are very fast, around 6x faster than C++!) and marshalling 
in F# has been 1,000x slower for me.

I honestly thought that I could grok F# from my OCaml background in only a few 
months but a year later and I am still battling with all of these trade-offs, 
design decisions and I have barely dented the issue of libraries, active web 
pages, Windows Presentation Foundation and so forth.

Following a discussion on Lambda the Ultimate, I am working on an article 
comparing and contrasting the OCaml and F# languages in detail. I'll let you 
know when I make the article freely available on our site. I think many of 
the points will be very relevant for people trying to build modern languages 
for the JVM.

There is one thing I am sure of: the future is bright for functional 
programming!

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to jvm-languages@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to