Conversion/porting to "mainstream" languages

Eray Ozkural
Tue, 12 Mar 2002 04:48:46 +0200

Hash: SHA1

On Tuesday 12 March 2002 04:36, Ashley Yakeley wrote:
> >How are others dealing with this? How big a project would it be to
> >translate, say, from Haskell to C or Java?
> Huge. IMO, you'd probably need to rewrite everything. On the plus side,
> Haskell is typically excellent for exploring any problem domain. So you
> might end up with better designed and more maintainable Java or C code
> than you would if you started from scratch. Or not.

I would use the right programming language for the tasks at hand. You should 
not IMO consider porting from one language to another which has radical 
differences. You will find it almost impossible to make a faithful 
translation of code that is still comprehensible if you rewrite in C/Java.

If there are resource critical tasks, you write them in C/C++. But with 
Haskell you can pull many tricks which would be otherwise very expensive. 
Using Haskell at the right level may actually save you a lot of time and 
money. Especially if you are doing a lot of symbolic processing somewhere. I 
would almost certainly want to have a high level interpreted environment that 
runs with a language such as Haskell or ocaml for complex projects ;)

It all depends on the application. If you are going to be done with 10.000 
lines of C++ code, in a well written and comprehensible way using Haskell 
might not help you too much. In fact, you will find it quite hard to do some 
of the everyday tasks in a new language...

However, consider a project such as MONO developed by certain famous monkeys. 
(They like being called like that) How many lines of code? How many would it 
take if it were written in Haskell? That's exactly the kind of project where 
Haskell would save you a lot of resources.

Look at the applications on your computer. Something a little too complex and 
it becomes 10's of megabytes in source code.... That's surely not needed.


- -- 
Eray Ozkural (exa) <>
Comp. Sci. Dept., Bilkent University, Ankara
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see