Hello, I am currently working on the redesign of some software system that has been developed in-house at a bank. To get a proof-of-principle implementation up and running quickly, I decided to use a high-level programming language. I returned to Haskell, which I used a few years ago in an academic environment. It turned out that Haskell really allowed me to implement something quite powerful in relatively short time. Meanwhile I am quite convinced that Haskell might not only be the right choice for a prototype, but also for the "real thing". But inevitably some people around here are scared about about the risks of using a non-mainstream programming language, and to some degree I understand them. The questions they are asking include: * Are there any references for using Haskell in industry? (I have looked at the Haskell-in-Practice page on haskell.org, but there I can't see how seriously all these applications are being used. For some of them it is immediately clear that they are academic or toy applications. But others might actually be used in production. I would be particularly interested in customer-specific software projects that have used Haskell.) * Can Haskell code be integrated with .NET, in case the department should decide to base more of its software on this platform? (I have found Sigbjorn Finne's integration of Hugs with .NET, but I would prefer the native-code compilation of GHC. I remember rumors about such a project years ago when Simon PJ went to Microsoft, but didn't find anything recent about this on the Web. I found notes about the GHC/.NET integration in the Mondrian project, but that appears to be unmaintained. Correct me if I am wrong.) * Will Haskell programmers be available 5 years from now to do the rather boring work of maintaining a then-legacy system? (Well, here I don't expect definitive answers. I just mentioned it here to give you a more complete picture. Unfortunately there was not much response to Jochen Leidner's message from September 2. BTW, with "then-legacy system" ) * Can't much of the simplicity of the Haskell code also be reached by just switching from C++ to something like Java or C#? (Probably an example from the application domain will be most convincing. So I probably have to bite the bullet and reimplement some code in Java or C#. But if you have some examples, they might be helpful. The quicksort example in http://www.haskell.org/complex/why_does_haskell_matter.html is unfortunately Haskell vs. C++.) I would be grateful for your hints, Heribert. PS: If I get permission from the bank, I will be happy to report in more detail about the project, which is an interesting Haskell application of its own.
Hi Heribert,
The questions they are asking include:
* Are there any references for using Haskell in industry?
Every project (bar two) that Galois has ever done has used Haskell. We've delivered tools, written in Haskell, to clients in industry and the U.S. government that are being used heavily. Three examples: Cryptol, our DSL for cryptography (with an interpreter and a compiler); a GUI debugger for a specialized chip, and a tool for easily embedding new syntax in the client's own language (sort of a suped-up Happy + OCaml's P4). As for references, as I write this, I'm also writing a talk for the Commercial Uses of Functional Programming (CUFP) workshop, entitled "Haskell in an Industrial Context" :-) (CUFP will be held this Saturday in conjunction with ICFP.) My talk focuses on the challenges that Galois' faces due to our use of Haskell, and some ways we (with lots of help) might overcome those challenges.
* Can Haskell code be integrated with .NET, in case the department should decide to base more of its software on this platform?
I'll let others handle this one in more detail, but I believe Sigbjorn ported his Hugs .NET support to GHC too.
* Will Haskell programmers be available 5 years from now to do the rather boring work of maintaining a then-legacy system?
This a fair question, and one we've been asked. So far the only answer we've come up with is "We sure hope so". It does seem likely, given that Haskell is being taught in lots of Universities. But what if Simon and Simon decide they'd rather build C# compilers? There's a gathering momentum in the Haskell community, but would it be enough? This is one of the biggest worries for the viability of Haskell in the long term.
* Can't much of the simplicity of the Haskell code also be reached by just switching from C++ to something like Java or C#?
It depends on how you quantify "much". There are benefits to moving to Java or C# from C++ (cleaner type systems, cleaner semantics, better memory management support). But languages like Haskell give you a lot more besides: they're much higher level, so you get more productivity, you can express more complex algorithms, you can program and debug at the "design" level, and you get a lot more help from the type system. These arguments have been made time and again though, and they're also pretty subjective. At Galois, it's also a big bonus that Haskell is close to its mathematical roots, because our clients care about "high assurance" software. High assurance software development is about giving solid (formal or semi-formal) evidence that your product does what it should do. The more functionality provided, the more difficult this gets. The standard approach has been to cut out functionality to make high assurance development possible. But our clients want high assurance tools and products with very complex functionality. Without Haskell (or some similar language), we wouldn't even be able to attempt to build such tools and products. Cheers, Andy -- Andy Moran Ph. (503) 626 6616, x113 Galois Connections Inc. Fax. (503) 350 0833 12725 SW Millikan Way, Suite #290 http://www.galois.com Beaverton, OR 97005 moran@galois.com
Hi, Heribert.Schuetz.extern@HVB.de wrote:
* Can Haskell code be integrated with .NET, in case the department should decide to base more of its software on this platform? (I have found Sigbjorn Finne's integration of Hugs with .NET, but I would prefer the native-code compilation of GHC. I remember rumors about such a project years ago when Simon PJ went to Microsoft, but didn't find anything recent about this on the Web. I found notes about the GHC/.NET integration in the Mondrian project, but that appears to be unmaintained. Correct me if I am wrong.)
we have a project with the objective of doing such a .NET implementation for GHC, supported by MS in this years' Rotor Request for Proposals. The previous efforts indeed are not being maitained, from what I know. I know the projects you mentioned, and also the ILX code generator developed by Don Syme at MS, that was also in GHC's codebase. So far we have looked into the existing research/implementations of functional languages/Haskell for JVM and .NET and done some small prototypes, to evaluate possible implementation strategies. We are therefore still in the early stages of development. cheers, Andre.
On Tuesday 14 September 2004 18:18, Heribert.Schuetz.extern@HVB.de wrote:
* Can't much of the simplicity of the Haskell code also be reached by just switching from C++ to something like Java or C#? (Probably an example from the application domain will be most convincing. So I probably have to bite the bullet and reimplement some code in Java or C#. But if you have some examples, they might be helpful.
I don't have examples but I've been working with C# 8 hours per day for 6 months and I ensure you that no, they are not simple. C++ is simpler for enterprise uses than C#, IMHO, because you fundamentally reuse other people libraries and so worry _less_ about memory management than you'd expect, but YMMV. On the other hand, C# has NO parametric polymorphism and after a while I've begun to miss C++ templates. C# has functional programming, they say, but no you can't use a method name as a function. You first have to create an "event". Composing this with the absence of parametric polymorphism and type inference, here's what a _monomorphic_ "map" function looks like, with a possibly naive syntax because I don't have the compiler handy (and worked 8 hours today,too). ///// public delegate int myDelegate(int i); //This is a type declaration public ArrayList map(myDelegate fn,ArrayList list); // Note that the list is untyped, but the function is strongly typed. { ArrayList result = new ArrayList(); foreach (Object obj in list) { result.Add(fn(obj)); } return result; } ///// 6 rows of effective code, untyped, contrived and poorly reusable. And this is the way you call it (you already know, ok, but now I am having fun :)) public int increment(int i) { return i+1; } map(new myDelegate(increment),myList); // note the call to "new" The map function from the haskell prelude: map f xs = [f x | x <- xs] and how you call it: map (\ x -> x+1) myList It's strongly typed, polymorphic and reusable. And it's far more readable and clear in intent, too. Do I need to say more? If you have the possibility to use haskell, ocaml or SML at work, do so :) OK, I realize that you already knew haskell, but you asked first :) Vincenzo
--- Heribert.Schuetz.extern@HVB.de wrote:
* Can Haskell code be integrated with .NET, in case the department should decide to base more of its software on this platform? (I have found Sigbjorn Finne's integration of Hugs with .NET, but I would prefer the native-code compilation of GHC. I remember rumors about such a project years ago when Simon PJ went to Microsoft, but didn't find anything recent about this on the Web. I found notes about the GHC/.NET integration in the Mondrian project, but that appears to be unmaintained. Correct me if I am wrong.)
The Sigbjorn Finne's .NET integration is also ported to GHC but I am not sure whether it is efficient enough. The bridge uses reflection to call .NET methods and each time when the method is called it is located by its name. I am working on simple report engine in Haskell which is callable from .NET and uses .NET classes as datasource. The solution which I choice was to build DLL in managed C++ which is called from Haskell. It is not so hard to automate this task with an apropriate tool. Cheers, Krasimir __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
On Wednesday 15 September 2004 08:44, Krasimir Angelov wrote:
The Sigbjorn Finne's .NET integration is also ported to GHC but I am not sure whether it is efficient enough. The bridge uses reflection to call .NET methods and each time when the method is called it is located by its name.
Where can I find it? And what about documentation? V.
You must call ./configure script with --enable-dotnet option and rebuild GHC. Cheers, Krasimir --- Vincenzo aka Nick Name <vincenzo_mlRE.MOVE@yahoo.it> wrote:
On Wednesday 15 September 2004 08:44, Krasimir Angelov wrote:
The Sigbjorn Finne's .NET integration is also ported to GHC but I am not sure whether it is efficient enough. The bridge uses reflection to call .NET methods and each time when the method is called it is located by its name.
Where can I find it? And what about documentation?
V. _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
participants (5)
-
Andre Santos -
Andy Moran -
Heribert.Schuetz.extern@HVB.de -
Krasimir Angelov -
Vincenzo aka Nick Name