From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id C0568BBB7 for ; Fri, 3 Oct 2008 10:06:17 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoBAE1v5UhQW+UCgWdsb2JhbACTYQEBFiIEpz6BaA X-IronPort-AV: E=Sophos;i="4.33,355,1220220000"; d="scan'208";a="29853810" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Oct 2008 10:06:17 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m9386FHg025229 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 3 Oct 2008 10:06:17 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoBAE1v5UhQW+UCgWdsb2JhbACTYQEBFiIEpz6BaA X-IronPort-AV: E=Sophos;i="4.33,355,1220220000"; d="scan'208";a="29853807" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 03 Oct 2008 10:06:15 +0200 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Klffw-0000mi-3P for caml-list@inria.fr; Fri, 03 Oct 2008 08:06:12 +0000 Received: from ks300734.kimsufi.com ([91.121.65.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Oct 2008 08:06:12 +0000 Received: from sylvain by ks300734.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Oct 2008 08:06:12 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: - Convert Caml to C/C++, C#, PHP, etc - Date: Fri, 3 Oct 2008 08:06:03 +0000 (UTC) Message-ID: References: <19791755.post@talk.nabble.com> <20081003141811.0cc9fb49.mle+ocaml@mega-nerd.com> <19792384.post@talk.nabble.com> <20081003153921.9bc91e12.mle+ocaml@mega-nerd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ks300734.kimsufi.com User-Agent: slrn/pre0.9.9-102 (Linux) Sender: news X-Miltered: at discorde with ID 48E5D278.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; le-gall:01 ocaml:01 compiler:01 wikipedia:01 wiki:01 compiler:01 ocaml:01 unreadable:01 bug:01 unreadable:01 translating:01 jocaml:01 wrote:01 wrote:01 readable:01 On 03-10-2008, Erik de Castro Lopo wrote: > axllaruse wrote: > >> I would like to convert all the MTASC open source project to >> C/C++ or PHP. > > Sorry, but you're crazy. > Indeed. > Converting the MTASC compiler to a less capable language (yes, C++ > is less capable) would be an exercise in extreme Greenspunning: > > http://en.wikipedia.org/wiki/Greenspun's_Tenth_Rule > You forget to mention another rule: "If it works, don't fix it" Which also apply to the WORKING mtasc compiler in OCaml. But, just for fun (and having work at converting COBOL program to C/C++), I really would like to see the result of an automatic conversion... Just for fun ;-) There is something like 100% chances, that the resulting source code will be totally __unreadable__, not working and full of undetectable bug. I think it will be worse to have an unreadable PHP file than a clean OCaml code. This kind of conversion can fill your entire life -- without good result. FYI, translating COBOL to other languages is in most cases not possible and, in the remaining cases, produced code is not readable. The only thing you can perform, quite well, is COBOL X to COBOL Y translation (like Fujitsu COBOL to MicroFocus COBOL). Or in our case, you can perform things like OCaml to JoCaml... Regards Sylvain Le Gall