From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pB9N1BQ6030661 for ; Sat, 10 Dec 2011 00:01:12 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjACAACS4k7AbSoIe2dsb2JhbABDhQaldCIBARYmBCGBcgEBBSNWEAsJCQYCAiYCAhQYHR4JiAmkMpEnFIEghySCBDNjBI03hziSKQ X-IronPort-AV: E=Sophos;i="4.71,328,1320620400"; d="scan'208";a="122806038" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Dec 2011 00:01:10 +0100 X-Envelope-From: oliver@first.in-berlin.de Received: from first (e178012209.adsl.alicedsl.de [85.178.12.209]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id pB9N18HM015506 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 10 Dec 2011 00:01:08 +0100 Received: by first (Postfix, from userid 1000) id 3D12F1540359; Sat, 10 Dec 2011 00:01:08 +0100 (CET) Date: Sat, 10 Dec 2011 00:01:08 +0100 From: oliver To: oleg@okmij.org Cc: caml-list@inria.fr, ontologiae@gmail.com Message-ID: <20111209230108.GC8946@siouxsie> References: <20111209065758.94306.qmail@eeoth.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20111209065758.94306.qmail@eeoth.pair.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: Re: [Caml-list] Why NOT to compile OCaml via C On Fri, Dec 09, 2011 at 06:57:58AM -0000, oleg@okmij.org wrote: > > Pierre-Alexandre Voye wrote: > > > Note that if Ocaml compiler would have a C backend, all these problems or > > architecture port would disappear... > > Ocaml would have more than 30 target[1] > > In my Opinion, trying to generate assembler is a bad idea because modern CPU > > require a lot of work to generate good assembler. > > There are many good reasons to avoid C when compiling functional > languages, especially strict ones. > > One often hears that ``C is a portable assembler''. That has never > been true. One of the reasons is that every assembler I know has the > "jmp" instruction, which, without affecting SP, transfers control > anywhere, out of a procedure or in the middle of a procedure, out of a > module or into a module. C is built around the stack discipline -- > after all, C is a descendant of Algol 60. (Although C has labels, they > are limited, even in GCC). Although Algol-60 researchers quickly > recognized the value of tail recursion, all that knowledge was lost in > the Dark Ages. [...] This somehow is a good example on "OCaml maintenance status..:" thread and "Some comments on recent discussions" thread... If this thread comes to a conclusion, the conclusion maybe can be sent to the OCaml core team... ... if it has new insights. But my guess is, that we end at a point, where OCaml already is, because I think these kind of dicsussions were already made, when the design was chosen. If something new evolves it could be sent to the core team. But I just doubt, that this will happen here ;) Ciao, Oliver